September 4, 2005 1:07 PM BST
i think you've been a victim of the screwed up 'box' model in MSIE... i've got it sorted but its one of them 'don't ask how' moments.
step one.. turn off the graphic so i can see the text.
step two.. make the header have a border round it, to make it possible to see it correctly. this showed two things, firstly both MSIE & Fire fox put the text in the same place & neither of them have it centred correctly. but since its in a fixed width box and nothing tells it to centre text *within* the box this is to be expected.
now i put the graphic back in...
it worked... all i've added is a border round the header.. taking this *out* corrupts things as before.. bizzare since the border is a visual element only, but it does work. unfortunatly setting the border to 0px brings the problem back.
but as a quick & dirty 'hack' (shudders at the very word) you can sort this out by adding *one* line to the CSS file.
replace:
h1.ir {
position:relative;
width:437px;
height:69px;
margin-left:auto; margin-right:auto; margin-top:10px; margin-bottom:auto;
padding: 0 ;
overflow:hidden;
}
with
h1.ir {
border: 1px solid #007788;
position:relative;
width:437px;
height:69px;
margin-left:auto; margin-right:auto; margin-top:10px; margin-bottom:auto;
padding: 0 ;
overflow:hidden;
}
the added line is the first one, the 'border' tag, you can set the colour to be anything naturally.
still not sure why this works, but at a guess its forcing something internally to make a calculation.
its worth noting that trying the centre the text within its box brings the problem back, so its something to do with working out the start point, hence my finger pointing at the box model.
this is a clever way of forcing the graphic over the text, never thought of this
let me know if this works..
the only problem is the text under the graphic not being centred exactly, but frankly i can't see this mattering
btw.. it is possible to have menus like that *without* javascript, CSS can do that kind of effect on its own.
but you don't get the nice fade ins..