Ik ben bezig met mijn site en wil graag een "sticky footer" en heb de oplossing van Ryan Fait gevonden. Op zich ben ik helemaal tevreden met deze oplossing alleen het enige wat ik graag anders zou willen is dat het witte vlak in het midden tussen de content en de footer helemaal doorloopt naar beneden. Iemand een idee hoe ik dit voor mekaar kan krijgen. Ben zelf nog maar net bezig met CSS en kom er niet uit. Heb een paar dagen geleden al een mailtje gestuurd naar die Ryan maar hij geeft geen reactie.
CSS:
HTML:
CSS:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
| /*
STICKER - A valid, easy to use CSS sticky footer by Ryan Fait
This is the basic CSS you need along with the one extra empty
div and the wrapper required to achieve the effect. I suggest
that you leave the * { margin: 0; } code in while testing and
building your site because margins do have a tendency to mess
things up a bit. Have fun!
Copyright (c) 2006-2007 Ryan Fait
*/
* {
margin: 0;
}
html, body {
height: 100%;
}
.wrapper { min-height: 100%; height: auto !important; height: 100%; margin: 0 auto -28px; /* the bottom margin is the negative value of the footer's height */
}
.footer, .push { height: 28px; /* .push must be the same height as .footer */
}
/*
TROUBLESHOOTING
I've received a few comments about vertical margins causing a
few problems with the layout. If you want space between
paragraphs or headers, use padding instead of margin. It's as
simple as that.
*/ |
HTML:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| <body background="images/tekst.gif"
onload="MM_preloadImages('images/button_red_home.gif''images/button_red_port.gif')">
<div class="wrapper">
<div class="header">
<h1><img src="images/top.gif" alt="" height="58" width="600" border="0" /></h1>
</div>
<div class="body">
<h2><a title="Desk Top Publisher" href="http://en.wikipedia.org/wiki/Desktop_publishing" target="_blank">Desk Top Publisher</a> - <a title="Graphic Designer" href="http://en.wikipedia.org/wiki/Graphic_design" target="_blank">Graphic Designer</a> - <a title="System operator" href="http://en.wikipedia.org/wiki/Sysop" target="_blank">System operator</a></h2>
<p><img src="images/merijnkleuter.jpg" alt="" height="416" width="570" border="0" /></p>
<p>Spelen totdat ik er bij neerviel doe ik eigenlijk nog steeds alleen hebben de speelgoed auto's plaats gemaakt voor computers.</p>
<p>| <a title="Apple" href="http://www.apple.com/nl/" target="_blank">Apple</a> | <a title="Microsoft" href="http://www.microsoft.com/nl/nl/default.aspx" target="_blank">Microsoft</a> | <a title="Photoshop" href="http://www.adobe.com/nl/products/photoshop/photoshop/" target="_blank">Photoshop</a> | <a title="Xpress" href="http://www.quark.com/" target="_blank">Xpress</a> | <a title="InDesign" href="http://www.adobe.com/nl/products/indesign/?promoid=BPBWW" target="_blank">InDesign</a> | <a title="Illustrator" href="http://www.adobe.com/nl/products/illustrator/?promoid=BPBWS" target="_blank">Illustrator</a> | <a title="Acrobat" href="http://www.adobe.com/nl/products/acrobat/?promoid=BPBVM" target="_blank">Acrobat</a> | <a title="GoLive" href="http://www.adobe.com/nl/products/golive/" target="_blank">GoLive</a> | <a title="Dreamweaver" href="http://www.adobe.com/uk/products/dreamweaver/?ogn=NL-gntray_prod_dreamweaver_home_nl" target="_blank">Dreamweaver</a> |</p>
</div>
</div>
<div class="footer">
<img src="images/button_left.gif" alt="" height="28" width="90" border="0" /><a title="home" href="index.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','images/button_red_home.gif',1)" target="_self"><img src="images/button_gray_home.gif" alt="home" width="69" height="28" border="0" id="Image1" /></a><a title="portfolio" href="portfolio.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image2','','images/button_red_port.gif',1)" target="_self"><img src="images/button_trans_port.gif" alt="port folio" width="81" height="28" border="0" id="Image2" /></a><a title="curriculum vitae" href="cv.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image3','','images/button_red_cv.gif',1)" target="_self"><img src="images/button_trans_cv.gif" alt="curriculum vitae" width="134" height="28" border="0" id="Image3" /></a><a title="links" href="links.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image4','','images/button_red_links.gif',1)" target="_self"><img src="images/button_trans_links.gif" alt="links" width="54" height="28" border="0" id="Image4" /></a><a title="contact" href="contact.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image5','','images/button_red_contact.gif',1)" target="_self"><img src="images/button_trans_contact.gif" alt="contact" width="82" height="28" border="0" id="Image5" /></a><img src="images/button_right.gif" alt="" height="28" width="90" border="0" /></div>
</body> |