Jump to content

css menu ie vs ffox


malibujamba

Recommended Posts

Hello,I have created a menu with css but there is one thing I can't figure out.In internet explorer it seems to work fine but in firefox I see dots in front of every '<li> or <a>'.Does anyone know what I am doing wrong?this is the css:

#menu {	position: absolute;	margin-top: 250px;	width: 700px;	height:25px;	font-family: verdana;	font-size: 11px;	font-weight: bold;	background-color: #777;}#menu ul {	margin-top: 3px;	margin-left: 100px;}#menu ul li {	float: left;	color: #ffffff;	margin-right: 50px;}#menu a {	color: #55A3D1;	text-decoration: none;}#menu a:hover {	text-decoration: none;	color: #FF8441;}

and this is the code:

<div id="menu">		<ul>						<li><a href="index.html">link1</a></li>					<li><a href="index.html">link2</a></li>			<li><a href="index.html">link3</a></li>				</ul>		</div>

Link to comment
Share on other sites

Firefox is doing it correctly, unordered lists are meant to put dots next to each list item.In order to prevent that you can add a line of CSS:#menu ul { margin-top: 3px; margin-left: 100px; list-style-type: none;}

Link to comment
Share on other sites

thnx,the dots are gone. but the 'links' are still in the same position as they where with the dots in firefox.i thought when the dots would be gone the position would be fine.but now in firefox the ul is about 20px more to the right then in internet explorer, you have any idea how come?

Link to comment
Share on other sites

Each browser puts different padding and margins to the list objects.Try this:#menu ul { margin-top: 3px; margin-left: 100px; list-style-type: none; margin: 0; padding: 0; padding-left: 20px; /* Change this to whichever value you want */}#menu ul li { float: left; color: #ffffff; margin-right: 50px; margin: 0; padding: 0;}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...