I'm working on a page where I want to show a menu (bunch of links), where the menu items are horizontally placed and positioned to the right side of the page (something similar to what you already see on the top of stackoverflow page when you are logged in).
The HTML looks like this:
<!DOCTYPE HTML>
<html>
<head>
<style type="text/css">@import url(styles/style.css);</style>
</head>
<body >
<div class="test">
<!-- float right -->
<ul class="fr">
<li><img src="images/1.gif" alt="image 1"/></li>
<li><img src="images/2.gif" alt="image 2"/></li>
<li><img src="images/3.gif" alt="image 3"/></li>
</ul>
</div>
</body>
</html>
The "test" CSS class is as follows:
.test ul {list-style:none; }
.test li { display:inline;}
This shows up fine on Chrome and Firefox. The li items are rendered inline and to the right side of the page, all on one line.
However, on IE8, these elements are rendered one below the other on the right side of the page.
I started looking into what's causing this by removing one line at a time and realized that getting rid of the:
<!DOCTYPE HTML>
from that HTML page, makes this show up fine even in IE8. Does anyone know what's causing a problem when is present on that page?
Of course, this is just a trimmed down version of my page and I do want to use the in my page for HTML5 features, so just removing it doesn't seem like solution.