DominikAngerer DominikAngerer - 7 months ago 20
HTML Question

ul, li menu - IE9 padding margin?

I have some problems with IE 9 and CSS. I want to make a ul,li menu like everyday (just joking not everyday) and get some errors I never had before. I have 2 screenshots of the problem. First IE 9:
Problem IE9

And here we have the way I want it and get it in Firefox, Chrome, Safari:
No Problem Firefox,Chrome,Safari

Here is the CSS of the whole menu thing:

#menu {
background: white url(images/menu.jpg);
width: 940px;
height: 58px;
margin: 40px auto;
}
#menu ul {
margin: 0px 0px 0px -50px;
padding: 0px 0px 0px 0px;
list-style: none;
line-height: normal;
text-align: center;
}
#menu li {
list-style: none;
line-height: normal;
float: left;
margin-left: 160px;
}
#menu a {
display: block;
float: left;
height: 55px;
padding: 0px 30px 0px 30px;
line-height: 56px;
letter-spacing: 1px;
text-decoration: none;
text-transform: uppercase;
font-family: 'Oswald', sans-serif;
font-size: 19px;
font-weight: normal;
color: #B5B5B5;
border: none;
}
#menu .current_page_item a {
color: #FFFFFF;
}
#menu a:hover {
text-decoration: none;
color: #FFFFFF;
}


And here is the HTML code of the menu:

<div id="menu">
<ul>
<li><a href="index.html"><strong>Startseite</strong></a></li>
<li><a href="programm.html"><strong>Programm</strong></a></li>
<li><a href="karten.html"><strong>Karten</strong></a></li>
<li class="current_page_item"><a href="#"><strong>Sponsoren</strong></a></li>
</ul>
</div>


I hope someone can help me with this..

BTW: http://adtime.agasoft.net/bako there you can find the whole HTML Page stuff! :)

Answer
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

This code before the tag and IE9 works well... :)

Comments