Menu backgrounds

asked Nov 22, 2012 in General by Jake (580 points)
I am looking for a way in CSS to create a horizontal menu that could change its unique background active link just like the one on in I also want it to be compatible with the major web browsers. If anyone has an idea, I would really appreciate you sharing it with me.

1 Answer

0 like 0 dislike
answered Nov 23, 2012 by WebProX (12,200 points)
Try this HTML code
   <ul id="nav">
<li><a href="#" class="active">MenuItem1</a></li>
<li><a href="#">MenuItem2</a></li>
<li><a href="#">MenuItem3</a><li>

on the  home page set the  html homepage class as active

Then is CSS, to make your menu horizontal try the code
#nav { list-style:none;}
#nav li {display:inline;background-color:#07F; }
#nav li a {  color:#FFF; }
.active { background-color:#F60;}

 Now just set the  class="active" on each page's menu i.e if you are on home page then you should use