...

View Full Version : height of menus differ in IE Windows



royS
06-03-2005, 07:12 AM
I'm new to CSS and am having a problem with the positioning of my menu heights in Win IE. It displays how I want on all the major mac browsers, but the way that the left side menu renders in IE Windows does not give the correct height distances from the top of the screen. Things that have almost too much room in Safari, FireFox, and IE Mac have not enough in Win IE.

Here is site in question:
http://www.mmmmmmmmmmmmmimic.net/

Here is the portion of CSS that designates height for the menu:

#header {
position: absolute;
top: 30px;
width: 170px;
left: 1px;
text-align: right;
}

#artwork {
position: absolute;
top: 95px;
width: 170px;
left: 1px;
text-align: right;
}

#misc {
position: absolute;
top: 185px;
width: 170px;
left: 1px;
text-align: right;
}

_Aerospace_Eng_
06-03-2005, 08:14 AM
Get rid of the top line in your page, its making IE go into quirks mode.
You don't need the absolute positioning for the uls, they will move into place since they are inside their own divs.
Use this for your CSS

/* CSS Document */

body {
margin: 0;
padding: 0;
}

h1 {
font-family: verdana,arial,sans-serif;
font-size: 11px;
color: #333333;
margin: 0;
padding: 0;
text-transform: uppercase;
font-weight: lighter;
}

h2 {
font-family: verdana,arial,sans-serif;
font-size: 10px;
color: #4E4D4D;
margin: 0;
padding: 0;
}

a:link {font-size: 9px; text-decoration: none; color: #666666; font-family: verdana, arial, helvetica, sans-serif;}
a:visited {font-size: 9px; text-decoration: none; color: #666666; font-family: verdana, arial, helvetica, sans-serif;}
a:hover {font-size: 9px; text-decoration: underline; color: #000000; font-family: verdana, arial, helvetica, sans-serif;}
a:active {font-size: 9px; text-decoration: underline; color: #000000; font-family: verdana, arial, helvetica, sans-serif;}

ul {
margin: 0px;
padding-top: 3px;
}

li {
margin: 0px;
padding: 0px;
list-style: none;
}

/* Fix IE. Hide from IE Mac \*/
* html ul li { float: left; }
* html ul li a { height: 1%; display:block; line-height:20px; }
/* End */

#header {
width: 170px;
margin-left: 1px;
margin-top:30px;
text-align: right;
}

#artwork {
width: 170px;
margin-left: 1px;
margin-top:5px;
text-align: right;
}

#misc {
width: 170px;
margin-left: 1px;
margin-top:5px;
text-align: right;
}
IE has a bug when it comes to vertical lists. I've added in the holly hack. Its the stuff in red. Notice the lists don't have absolute positioning anymore.

royS
06-03-2005, 08:47 AM
Hey, that was just what I needed. Removing those absolutes was right on. Thanks a ton! :)

I ended up liking the nav better without the hack, but I can see where it is useful.

Which page's top line should be removed?

The index page's top line:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

Or the navigations frame's top line:
<?xml version="1.0" encoding="iso-8859-1"?> (my guess is it is this one.)

Would having this (<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">) as top line in index page and this (<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">) as top line in the left frame cause browsers to go into quirks mode?

Thanks Again!

_Aerospace_Eng_
06-03-2005, 09:06 AM
It should be fine using both of those doctypes. Yes the xml prologue was the line I was talking about the very first line <?xml version="1.0" encoding="iso-8859-1"?>

royS
06-03-2005, 05:47 PM
Thanks, got it. :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum