Hi there,
I am currently working on rebuilding a table website into one done in css. So far so good, I've managed to have it looking pixel perfect in nearly all the browsers I've checked it in (Firefox, Opera, IE6, IE 7 look identical, Safari is 99% identical, just some links that are shifted a couple of pixels to the right, but that's no biggie).
I was doing some testing today by resizing the browser window. Making sure that wouldn't give any problems either.
- IE was fine
- Opera no problem
- Safari worked like a charm
- Firefox... PROBLEM!
I have 2 divs in my footer containing 2 links. I used the divs and padding on the A tag to make sure they got positioned right.
I am relatively new to css so perhaps this could have been done in another way. So if you've got suggestions I am all ears.
Anyway, when the window resizes these two divs are pushed down, pushing the footer up (the site occupies 100% of the viewport) and creating a big gap containing the links.
I do not really understand how this can happen. I am not using any floats on those divs nor is the top one using any margin. Yet it is pushed down by the same margin as the second div is set to.
I tried changing the margin for padding but that didn't change a thing. I also tried giving the divs a height. Didn't change a thing either.
This only happens on Firefox (I am using 3.0, not sure if it also happens on lower versions), all the other browsers are fine as far as I can check.
Can you please help me solve this?
You can find the site at: http://www.mediascape.nl/test/nl-index.htm
Here's the code...
CSS:
HTML:Code:html, body { height: 100%; } body{ text-align: center; background: #dad7dd; font-family: verdana, arial, helvetica, sans-serif; margin:0; padding:0; } /* basic setup */ #container{ margin: 0 auto; width: 751px; min-height: 100%; text-align: left; background: #fff url(graphics/main-bg.gif) repeat-y 0 0; margin-bottom:-100px; /* bottom margin needs to have the same height as footer, only negative */ } #footer{ margin: 0 auto; width: 751px; height: 100px; background: #fff url(graphics/bottombar.jpg) no-repeat 0 0; } .clear{ clear:both; height:1px; overflow:hidden; margin-top:-1px; } #header{ width:751px; height:144px; background: #fff url(graphics/topbar.jpg) no-repeat 0 0; margin: 0 0 0 0; padding: 0 0 0 0; } /* header content */ #flag{ width: 748px; height: 30px; text-align: right; } img.flag{ padding: 7px 7px 0 0; } #topmenu{ width: 717px; text-align: right; margin: 97px 0 0 0; padding: 0 0 0 0; } a.topmenu:link, a.topmenu:visited{ color: #d59f00; text-decoration: none; font-size: 10px; padding: 0 0 0 19px; } a.topmenu:hover, a.topmenu:active{ color: #d59f00; text-decoration: underline; font-size: 10px; } /* midsection divs */ #nav{ float: left; width:175px; color: #fff; font-size: 15px; font-weight: bold; padding-left: 12px; padding-bottom: 100px; /* content divs need to have the same height as footer */ } #main{ float: left; width: 500px; margin: 0 0 0 0; font-size: 11px; text-align:left; padding-bottom: 100px; /* content divs need to have the same height as footer */ } /* settings for image rollover menu without html text on buttons */ .menu { margin: 0; padding: 0; width: 167px; /* width of rollover image */ list-style: none; } .menu li { padding: 0; margin: 0; height: 30px; /* height of rollover image */ list-style: none; background-repeat: no-repeat; } .menu li a, .menu li a:visited { display: block; text-decoration: none; text-indent: -9999px; /* push the text out of the way while keeping it still there for text readers and google */ outline: none; /* getting rid of the link outline in Firefox due to text-indent */ height: 30px; /* height of rollover image */ background-repeat: no-repeat; } /* rollover states for dutch version */ .mediascape {background-image: url(graphics/nav-mediascape-on.gif);} /* rollover state */ .mediascape a {background-image: url(graphics/nav-mediascape.gif);} /* normal state */ .diensten {background-image: url(graphics/nav-diensten-on.gif);} .diensten a {background-image: url(graphics/nav-diensten.gif);} .werkwijze {background-image: url(graphics/nav-werkwijze-on.gif);} .werkwijze a {background-image: url(graphics/nav-werkwijze.gif);} .kosten {background-image: url(graphics/nav-kosten-on.gif);} .kosten a {background-image: url(graphics/nav-kosten.gif);} .portfolio {background-image: url(graphics/nav-portfolio-on.gif);} .portfolio a {background-image: url(graphics/nav-portfolio.gif);} .sponsoring {background-image: url(graphics/nav-sponsoring-on.gif);} .sponsoring a {background-image: url(graphics/nav-sponsoring.gif);} /* rollover states for english version */ .mediascape-uk {background-image: url(graphics/nav-mediascape-uk-on.gif);} .mediascape-uk a {background-image: url(graphics/nav-mediascape-uk.gif);} .diensten-uk {background-image: url(graphics/nav-diensten-uk-on.gif);} .diensten-uk a {background-image: url(graphics/nav-diensten-uk.gif);} .werkwijze-uk {background-image: url(graphics/nav-werkwijze-uk-on.gif);} .werkwijze-uk a {background-image: url(graphics/nav-werkwijze-uk.gif);} .kosten-uk {background-image: url(graphics/nav-kosten-uk-on.gif);} .kosten-uk a {background-image: url(graphics/nav-kosten-uk.gif);} ul.menu li a:hover { background: none; } /* footer divs */ #terms{ width: 748px; text-align: right; margin: 0 0 0 0; padding: 0 0 0 0; } #parent{ width: 748px; text-align: left; margin: 60px 0 0 0; padding: 0 0 0 0; } a.bottom:link, a.bottom:visited{ color: #d59f00; text-decoration: none; font-size: 10px; padding: 0 36px 0 20px; } a.bottom:hover, a.bottom:active{ color: #d59f00; text-decoration: underline; font-size: 10px; } /* content styling */ #header-mediascape { text-align: left; text-indent: -9999px; /* push the text out of the way while keeping it still there for text readers and google*/ background: url(graphics/header-mediascape.gif) no-repeat 0 0; height: 33px; margin-top: 0; padding-bottom: 0; } img.foto1{ float:right; padding: 0 0 0 3px; } p { padding: 0; margin-top: 0; margin-right: 0; margin-bottom: 1em; margin-left: 0; } a:link, a:visited{ color: #264D85; text-decoration: none; font-size: 11px; } a:hover, a:active{ color: #264D85; text-decoration: underline; font-size: 11px; } p.homestart { padding: 0; margin-top: 10px; margin-right: 0; margin-bottom: 0; margin-left: 0; } p.doublespace { padding: 0; margin-top: 0; margin-right: 0; margin-bottom: 2em; margin-left: 0; } p.lotsaspace { padding: 0; margin-top: 0; margin-right: 0; margin-bottom: 10em; margin-left: 0; } .vet { font-weight: bold; } .schuin { font-style:italic; } ul{ margin: 10px 0 10px 50px; padding: 0; list-style: square; } li{ margin: 5px 0 0 0; }
HTML Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="nl"> <head> <title>Mediascape - design & development: webdesign, e-commerce, content management, banners, huisstijlen, logo's, flyers, reklame en meer</title> <meta name="keywords" content="webdesign, website, website prijzen, webdesign tarieven,website tarieven, MKB, intranet, midden en kleinbedrijf, emmeloord, noordoostpolder, flevoland, foto's vrijmaken, vrijmaken, foto's uitknippen, uitknippen, betaalbaar, voor elk budget, webdevelopment, webpromotion, webpromotie, business solutions, ecommerce, e-commerce, online, websites, ontwerp, websiteontwerp, grafisch, webdesignbureau, webdesign bureau, webdesignburos, webdesignburo, webontwerp, sitebouw, design, ontwerp, ontwerpen, winkels, shop, shops, webshop, advies, consultancy, restyling, zoekmachine , restyle, aanmelden , internet marketing , content management, CMS, open source oplossingen, website laten ontwerpen, websiteontwerp, website ontwerp, betaalbaar, webcommunicatie, internetbureau, grafisch ontwerp, goedkoop websiteontwerp, website creatie, bouwen, maken, ontwerpen, design, marketing, website maken, reclamebureau, website ontwerpen, website bouwen, huisstijl, logo, visitekaartjes, internet, internetsite, ontwikkeling, webdesign, site, webpagina, communicatie, grafisch, grafische, vormgeving, professionele, professioneel, web, intranet, webmarketing, cd-rom, adviesbureau, advies, multimedia, banner, flyer, folder, netwerk, promotie, business-to-business, b2b, b2c, portal, oscommerce, startende, onderneming, presentatie, database, zakelijk, e-commerce, e-business, b-to-b, b-to-c, html, pagina, marktonderzoek, nl, bedrijfslogo, Mediascape, internet marketing, website promotie, fotobewerking, retouchering, cover ontwerp, dvd, dvd hoes, webwinkel, web winkel, internet winkel"> <meta name="description" content="Betaalbare, professionele oplossingen voor internet en multimedia. Uw adres voor onder meer webdesign, e-commerce, content management, banners, huisstijlen, logo's, visitekaartjes, etc."> <meta name="robots" content="index, follow"> <meta name="lang" content="nl"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="opmaak.css" rel="stylesheet" type="text/css"> <!--[if IE 6]> <link rel="stylesheet" type="text/css" href="ie6.css"> <![endif]--> </head> <body> <!--start container--> <div id="container"> <!--start header--> <div id="header"> <div id="flag"><a href="uk/uk-index.htm" target="_top"><img src="graphics/flag-uk.jpg" width="24" height="15" border="0" alt="english flag" title="switch to english" class="flag"></a></div> <div id="topmenu"><a href="nl-index.htm" target="_top" class="topmenu">home</a><a href="nl-contact.htm" target="_top" class="topmenu">contact</a></div> </div> <!--einde header--> <!--start content--> <div id="nav"> <ul class="menu"> <li class="mediascape"><a href="nl-mediascape.htm" target="_top">over mediascape</a></li> <li class="diensten"><a href="nl-diensten.htm" target="_top">diensten</a></li> <li class="werkwijze"><a href="nl-werkwijze.htm">werkwijze</a></li> <li class="kosten"><a href="nl-kosten.htm">kosten</a></li> <li class="portfolio"><a href="nl-portfolio.htm">portfolio</a></li> <li class="sponsoring"><a href="nl-sponsoring.htm">sponsoring</a></li> </ul> </div> <div id="main"> <p class="homestart"></p> <p>Mediascape staat voor: <ul type="square"> <li>een hoogwaardig eindresultaat tegen een aantrekkelijke prijs</li> <li>ruime ervaring en expertise</li> <li>flexibiliteit</li> <li>klantvriendelijkheid</li> </ul></p> <p>U kunt bij ons terecht voor een breed scala aan grafisch ontwerp, internet en multimedia diensten. Van websites en cd-roms tot flyers en huisstijlen. Mediascape levert maatwerk, op basis van uw specifieke wensen.</p> <p>Zo bent u ten alle tijden gegarandeerd van een uniek resultaat.</p> <img src="graphics/office.jpg" width="320" height="165" border="0" alt="foto van kantoorgebouw" class="foto1"><p>Hoewel ontwerp en realisatie onze primaire activiteiten zijn stopt onze dienstverlening hier vanzelfsprekend niet.</p> <p>We adviseren, initiëren en concretiseren zaken voor u die wellicht anders zouden blijven liggen. </p> <p>Door actief mee te denken voor wat betreft uw marketing en communicatie komen we gezamelijk tot nieuwe inzichten en mogelijkheden voor uw bedrijf. </p> <p>Daarnaast kunnen we u voorzien van advies op automatiserings gebied, optreden als intermediair richting toeleveranciers als drukkers en providers. En zijn we desgewenst beschikbaar als onafhankelijk adviseur bij (relevante) vraagstukken binnen uw onderneming.</p> <p>Overtuig uzelf van wat Mediascape allemaal voor uw organisatie kan betekenen.</p> </div> <!--einde content--> <div class="clear"></div> </div> <!--einde container--> <div id="footer"> <div id="terms"><a href="nl-voorwaarden.htm" target="_top" class="bottom">algemene voorwaarden</a></div> <div id="parent"><a href="http://www.altculture.nl" target="_top" class="bottom">an Alt. Culture company</a></div> </div> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-4586093-1"); pageTracker._initData(); pageTracker._trackPageview(); </script></body> </html>





Bookmarks