简体   繁体   中英

Weird bug in header in IE7

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?

如果在CSS中添加相对于导航栏元素的Position:而不是position:fixed,则将在IE7中解决。

<div class="navbar"> <- position: fixed to position: relative .

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;
}

Add to your css

div.navbar { left:0 }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM