views:

36

answers:

3

Hi all,

I have a weird bug in IE7. http://www.luukratief-design.nl/dump/simplefolio/

the navigation has to be centered. same goes for the background. Now every browser does it perfectly. even IE6! (didnt do pngfix yet). The only one who is having problems is IE7 who shifts the whole navbar element to the right.

Anyone knows how this is possible?

A: 

If you add Position: relative to your navbar element in your css instead of position: fixed it will be solved for IE7.

<div class="navbar"> <- position: fixed to position: relative .
Younes
If he adds gets rid of position fixed his nav won't follow when he scrolls.
Catfish
Damn, didn´t notice that the top bar was moving with the scrolling at all..
Younes
exactly... alltho it is a step in the right direction. with relative it centers the right way...
Luuk
It's not a step in the right direction because it doesn't stick like position fixed does. I'd say that position fixed is more of a step in the right direction because you get it to stick at least, it's just off to the right a bit.
Catfish
A: 

I bet it's this line

.navbar {
  background:url("../images/bg-nav.png") repeat scroll center top transparent;
}

change it to

.navbar {
  background:url("../images/bg-nav.png") repeat scroll left top transparent;
}
Catfish
nope that is not it
Luuk
try floating the div.navbar left and see what happens.
Catfish
I've edited my answer. Check it out.
Catfish
A: 

Add to your css

div.navbar { left:0 }

Alohci