Log in

View Full Version : Why the menu is shown differently in IE?



costas
01-14-2007, 03:27 PM
Hi to all,
I'm making a forum and I have a menu (made with some css code)! In mozilla it is shown as I expected, but when I try to open that page with Internet Explorer it is not shown properly! Here's the css code and the html part:


====
css
====
a.fixed
{
float:center;
width:6em;
text-decoration:none;
color:black;
background-color:white;
padding:0.2em 0.6em;
border-right:1px solid white;
text-align: center;
}
a.fixed:hover {text-decoration: underline}
========
end of css
========
=======
html part
=======
<center>
<a href="./index.php" class="fixed">Main Page of Forum</a>
<a href="./register.php?action=signup" class="fixed">Register to Forum</a>
<a href="./log.php" class="fixed">Log-in to Forum</a>
<a href="./logout.php" class="fixed">Logout []</a>
<a href="./cp.php" class="fixed">Control Panel</a>
<a href="./members.php" class="fixed">Members Page</a>
<a href=".faqs.php" class="fixed">Forum FAQs</a>
<a href="./top.php" class="fixed">Top Ten Posters</a>
<a href="./search.php" class="fixed">Search Forums</a>
<a href="./sitemap.php" class="fixed">Forum Sitemap</a>
</p><br></center>
=========
end of html
=========


Mozilla1.jpg ->how it is shown in Mozilla
IE.jpg->how it is shown in Internet Explorer

Could anyone tell me why is this happening?

Thanks in advance!

jscheuer1
01-15-2007, 06:28 AM
Either or both of the red highlighted styles are likely to be causing this:


float:center;
width:6em;
text-decoration:none;
color:black;
background-color:white;
padding:0.2em 0.6em;
border-right:1px solid white;
text-align: center;

Also, float:center is meaningless, get rid of it. The problem with the width is that it may be too narrow, causing the text to wrap, increase it gradually and see what happens. The text-align:center is problematical, it is better to use margin:0 auto; but, this requires at least an HTML 4.01 transitional DOCTYPE in IE. It actually might not be a problem though, the text-align:center, once there is enough width available.

costas
01-15-2007, 07:43 PM
Thanks man!! BTW it was the first one!!