PDA

View Full Version : IE6 is annoyingly stupid


tomas.srna
03-22-2008, 11:37 AM
Hello

I have a very strange problem.

Please look at http://keramikalj.srna.sk in Firefox - this is how it should look.
And please look at the same page in IE6 - there is a strange problem, probably with floats.

Can u please suggest me anything to fix it?

Thank you.

abduraooft
03-22-2008, 02:55 PM
Change your doctype to <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Then have a try by adding/changing some styles, say
*{
padding: 0;
margin: 0;
}
...........
#mainmenu
{
width: 900px;
height: 32px;
background-image: url('mainmenu.png');
position:relative;
}

#search
{
position:absolute;
left:0;
height:32px;
}
#search form{
padding:5px 0 0 5px;
}
#mainmenu ul
{
list-style-type: none;
padding: 0;
margin: 0;
margin-left:230px;

}
...........
#mainmenu li a
{
color: white;
text-decoration: none;
font-family: "Trebuchet MS", Tahoma, sans-serif;
font-weight: bold;
font-size: 1.2em;
display: block;
float:left;
height: 22px;
padding: 5px 10px
}

#mainmenu li a:link,#mainmenu li a:visted
{
background-image: url('/img/mainmenu.png');
}
#mainmenu li a:hover,#mainmenu li a:active
{
background-image: url('/img/mainmenu_hover.png');
}
The main issues are

you have given display block to #mainmenu li a, and this is pushing down all the wrapper lis
the pseudo order should be :link :visited :hover :active (LoVe-HAte), other wise IE may show some bugs.

tomas.srna
03-22-2008, 04:39 PM
Thanks. This solved my problem.

People should really stop using IE - at least earlier than 6.