...

View Full Version : another css prob, navigation gets pushed up in IE9



Chris-2k
07-24-2011, 01:30 PM
Hey.

I'm working on a website right now, and it's almost finished. It looks just like i want it to in FF and Safari and all other browsers, but in IE 9 it pushes the whole menu up.

Screenshot IE9 (assuming its the same in IE 6/7 and 8):

http://imgcrave.com/u/j469D.png

Screenshot Mozilla FF5:

http://imgcrave.com/u/yFBv5.png

Here's da CSS:



#navbar {
background: url(site_images/navbar.gif) no-repeat;
width: 475px;
height: 34px;
float: right;
margin-right: 40px; }

#navigation li {
list-style-type: none;
display: inline;
float: left;
margin-top: -11px;
padding-right: 30px; }

#navigation a {
text-decoration: none;
color:#ffffff;
font-size: 11px; }

#navigation a:hover {
background: url(site_images/active.gif) no-repeat;
text-decoration: underline;
color: #079bd4; }
A live view: http://79.143.184.10/css2/index.php

Any1 can help?

Janis-php
07-24-2011, 03:20 PM
I also have had a problem, centered elenentur,checked again all the elements.Something somewhere is not specified or is specified multiple times

tracknut
07-24-2011, 03:23 PM
With no doctype, IE will render in quirks mode - very different from standards mode. Put in a doctype, fix your code errors (http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2F79.143.184.10%2Fcss2%2Findex.php), and see if that solves it.

Dave

Sammy12
07-24-2011, 06:41 PM
as with a doctype, you need to set a height to your lis.



#navigation li {
height: 34px;
line-height: 34px;
}


instead of trying to use a negative position relative, using line-height (equal to the height) to center vertically

---

you can view ie7 & ie8 in ie9. its a useful simulator.
should be tools --> developer tools (or just f12 is you have one).

http://i1114.photobucket.com/albums/k535/auroralight1/Untitled-11.png



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum