Ik probeer via onderstaande code een footer div geheel onderaan te positioneren, opzich gaat dit goed, alleen IE laat 1 pixel onder de footer leeg. Heb dit al vaker bij andere sites die ik gebouwd heb gehad maar nog steeds geen goede en correcte oplossing voor gevonden.
Heb al de hele dag lopen stoeien met de CSS, door het toevoegen van
aan de html, body en het footer element maar dat helpt helaas allemaal niks. Ook diverse links en posts hier op GoT geven niet echt duidelijkheid hierover.
IE- Internet Explorer 6 screenshot:

FF - Firefox 1.5 screenshot:

Zoals je kan zien laat IE 1 pixel voor de footer over, het enige hoe ik dit opgelost krijg is door bij de #footer CSS de bottom op -1px; te zetten. Maar dan heb ik natuurlijk bij FF en Opera maar 49px over en bij IE 50.
Dit is de XHTML:
De bijbehorende CSS (onbelangrijke stukjes weggehaald):
Is dit simpel via CSS op de lossen, of dien je toch perse een IE hack ofzo te gebruiken?
Heb al de hele dag lopen stoeien met de CSS, door het toevoegen van
Cascading Stylesheet:
1
2
3
| margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; border: 0px 0px 0px 0px; |
aan de html, body en het footer element maar dat helpt helaas allemaal niks. Ook diverse links en posts hier op GoT geven niet echt duidelijkheid hierover.
IE- Internet Explorer 6 screenshot:

FF - Firefox 1.5 screenshot:

Zoals je kan zien laat IE 1 pixel voor de footer over, het enige hoe ik dit opgelost krijg is door bij de #footer CSS de bottom op -1px; te zetten. Maar dan heb ik natuurlijk bij FF en Opera maar 49px over en bij IE 50.
Dit is de XHTML:
HTML:
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
27
28
29
30
31
32
33
34
35
36
37
| <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <meta name="keywords" content=""></meta> <link rel="stylesheet" href="css/style.css" type="text/css" title="Standaard stijl" /> </head> <body> <div id="header"> <div id="header_balk1" class="absoluteposition whitebottomrightborder"></div> <div id="header_logo" class="absoluteposition whitebottomrightborder"></div> <div id="header_image" class="absoluteposition whitebottomrightborder">[img]"images/header_image.jpg"[/img]</div> <div id="header_image2" class="absoluteposition whitebottomrightborder"></div> <div id="header_image3" class="absoluteposition whitebottomrightborder"></div> <div id="header_image4" class="absoluteposition whitebottomrightborder"></div> <div id="header_image5" class="absoluteposition whitebottomrightborder"></div> <div id="header_image6" class="absoluteposition whitebottomrightborder"></div> <!-- Menu buttons //--> <div id="header_button1" class="absoluteposition whiterightborder"><a href="">[img]"images/button_overmbs_off.jpg"[/img]</a></div> <div id="header_button2" class="absoluteposition whiterightborder"><a href="">[img]"images/button_producten_off.jpg"[/img]</a></div> <div id="header_button3" class="absoluteposition whiterightborder"><a href="">[img]"images/button_projecten_off.jpg"[/img]</a></div> <div id="header_button4" class="absoluteposition whiterightborder"><a href="">[img]"images/button_nieuws_off.jpg"[/img]</a></div> <div id="header_button5" class="absoluteposition whiterightborder"><a href="">[img]"images/button_partners_off.jpg"[/img]</a></div> <div id="header_button6" class="absoluteposition"><a href="">[img]"images/button_contact_off.jpg"[/img]</a></div> <!-- End of menu buttons //--> </div> <div id="left_menu"> <div>[img]"images/onze_producten_title.gif"[/img]</div> </div> <div id="footer"></div> </body> </html> |
De bijbehorende CSS (onbelangrijke stukjes weggehaald):
Cascading Stylesheet:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| * {-moz-box-sizing: border-box; box-sizing: border-box;} html {height:100%;} body {height: 100%; overflow: hidden; cursor: default; font-family: Verdana, Tahoma, "Lucida Sans Unicode", Arial; font-size: 11px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; line-height: 18px;} form {margin: 0px 0px 0px 0px;} a {text-decoration: none;} a:hover {text-decoration: underline;} .nocontent {font-size: 0px; line-height: 0px;} .absoluteposition {position: absolute;} .whitebottomrightborder {border-bottom: 1px solid #FFFFFF; border-right: 1px solid #FFFFFF;} .whiterightborder {border-right: 1px solid #FFFFFF;} .whitebottomborder {border-bottom: 1px solid #FFFFFF;} #header {width: 900px; height: 182px;} #header_balk1 {top: 0px; left: 0px; width: 13px; height: 119px; background-image: url('../images/header_balk1.jpg'); background-repeat: no-repeat;} #header_balk2 {top: 119px; left: 13px; width: 29px; height: 31px; background-color: #396E32; background-image: url('../images/header_balk2.jpg'); background-repeat: no-repeat;} #header_balk3 {top: 0px; left: 864px; width: 38px; height: 119px; background-image: url('../images/header_balk3.jpg'); background-repeat: no-repeat;} #header_balk4 {top: 119px; left: 864px; width: 36px; height: 31px; background-color: #396E32;} #header_logo {top: 0px; left: 13px; width: 201px; height: 119px; background-image: url('../images/header_logo.jpg'); background-repeat: no-repeat;} ... #header_button6 {top: 150px; left: 724px; width: 139px; height: 30px; z-index: 1;} ... #left_menu {position:absolute; width:190px; left:0px; top:182px; bottom:44px; z-index: 1; overflow:auto; border-right: 1px solid #D6D6D6;} * html #left_menu {height:100%; top:182px; bottom:50px;} #footer {position:absolute; display:block; bottom: 0px; left: 0px; width:900px; height:50px; background-color: green; color:#FFFFFF; z-index: 2;} |
Is dit simpel via CSS op de lossen, of dien je toch perse een IE hack ofzo te gebruiken?