Jump to content

IDs and CSS


Renegade605

Recommended Posts

Hi all. On my website I have a menu system set up which uses a pseudo-bullet list to make. By setting the display property to inline, I made the navigation buttons appear in a horizontal line. I've tried to make the page which the user is currently visiting highlight itself by changing the color of the text, but it doesn't work in FF. Please see the code:CSS:

ul.topmenu		{ margin: 8px 0px; text-align: center; }ul.topmenu li	{ display: inline; }ul.topmenu li a{	text-decoration: none;	font-weight: bold;	font-size: 10px;	font-family: verdana, helvetica, sans-serif;	vertical-align: middle;	border: 1px solid #000000;	color: #a5a5a5;	padding: 4px;	background-image: url(../images/borders/form.png);	background-color: #3c3c3c;	background-repeat: repeat-x;	background-position: top left; }}ul.topmenu li#topmenu_current a	{ color: #ffffff; }ul.topmenu li a:hover			{ color: #ffffff; border-color: #7c7c7c; background-image: none; }

<ul class="topmenu">	<li><a href="1.html">Page 1</a></li>	<li id="topmenu_current"><a href="2.html">Page 2</a></li>	<li><a href="3.html">Page 3</a></li>	<li><a href="4.html">Page 4</a></li>	<li><a href="5.html">Page 5</a></li></ul>

The text inside of the Page 2 anchor should be white instead of grey, but in FF there is no difference between the 'topmenu_current' and the regular one.Why would this occur?EDIT: I have found a syntax error in the CSS which is what caused this. There were two '}' instead of one.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...