So when page is loaded div#featured moves 10 pixel to left and I don’t have any idea why. And this happens only with IE7 and even with JS disabled so it’s must be CSS problem.
If you have IETester you can see that by yourself but here is also screenshot.
http://demo.knarsku.com/news-flash
CSS part: http://pastebin.com/EHHqQKG1
Any suggestion?
I have not looked at your code at all. But if it is in just an IE7 issue then why not just use a conditional comment to only adjust the div back for IE7 .
For a IE7 specific stylesheet
<!--[if IE 7]>
<link rel="stylesheet" href="ie7_specific_stylesheet.css" />
<![endif]-->
If you have ie6 problem …
<!—[if IE 6 ]> #nav{ padding-left:0px; } input.submit{ background: url(images/searchform-submit-btn.png) no-repeat 0 0 transparent; border:none; width:39px; height:35px; margin-left:8px; display:block; position:absolute; cursor:pointer; float:right;} DD_belatedPNG.fix(‘img, .box, .text-caption, .left-side, .logo,.nav-element’); <![endif]—>
if you have ie7 problem …
<!—[if IE 7 ]> #nav{ padding-left:0px; } input.submit{ background: url(images/searchform-submit-btn.png) no-repeat 0 0 transparent; border:none; width:39px; height:35px; margin-left:8px; display:block; position:absolute; cursor:pointer; float:right; margin-top:0px;} <![endif]—>
Maybe I didn’t explain this enough. If you were looked source code you would see that there is ie7-fix.css but I can’t use it to this problem because it doesn’t help me now.
I could put even margin-left: 1000px; put when page is fully loaded IE7 will still show it like this. I’ve also tried adjust this with jQuery too but without any difference.
Okay I solved this. I added position: static; to ie7 and problem solved!
- Exclusive Author
- Has been a member for 2-3 years
- United States
Seems like a pretty dirty fix. I’d use a IE7 CSS selector just to make sure it doesn’t effect any other browser:
* html #nav { position: static; }
Change #nav to whatever the actual element is, obviously.
