View Full Version : Header image displaced in FF but not in IE7

02-20-2008, 10:39 PM
Hi all

My site is displacing the header image down in FF but looks fine in EI7. The html for this bit looks like this:

<div align="center">
<table align="center" border="0" cellpadding="0" cellspacing="0" width="766">
<div id="header">

and the CSS like this:

/*Overall look*/
body {height: 100%; background: #ede6c3 url(images/strip.gif) repeat-x; font-family: Verdana, Arial, Helvetica, Sans Serif;}
.clr {clear: both;}

/*Image Sections*/
#header {float: left; padding: 0px; width: 718px; height: 200px; background: #ede6c3 url(images/header2.gif) no-repeat}

Hope this is enough code. Any ideas would be gratefully received


02-21-2008, 12:05 AM
its probably not enough code but I'll take a stab at saying it's the default padding/margin set on the page in each browser.

for kicks add:

html, body {
padding: 0;
margin: 0;

to the top of the css and see if it gets you anywhere.

02-21-2008, 03:47 PM
Dear hOTV

Thanks this actually moved it down slightly more but the good news (I think) is that they both now look uniformly out of sync.

many thanks for the quick response, I will fiddle around with the parameters a bit, but any other suggestions most welcome


02-21-2008, 09:15 PM
Dear hOTV

Thanks - I learned that sometimes its just as important to specify zero values rather than no values. Problem solved !


02-21-2008, 09:54 PM
Hey tassie,

I'll assume your relatively new to this. As you go along you'll encounter more issues like this. All browsers have default padding and margin on elements and, sadly, they all differ. A lot of people out there preach the global reset

* {
padding: 0;
margin: 0;

It's used to take the padding and margins off everything.

I actually used to a be a proponent of this. I have since changed my mind. Maybe because my work is touched by so many other people and doing this and not redefining all the settings leaves them clueless. Plus unless you really have your head around it, it can make things actually more difficult. Its a good idea but you really need to know what it does and how it affects all the elements.

Eric Meyer has a reset as well. (http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/) It handles most of the elements, but again, unless you understand what it does, it can be a pain to handle.

And some more intresting reading if interested ;) (http://meyerweb.com/eric/thoughts/2007/04/18/reset-reasoning/)

have fun and if you need more help just shout.