Web Hosting Geeks | Web Hosting Experts
Need help? Call us 1(866)TOP-HOST

14611 reviews 1734 hosting providers

Questions & Answers

Menu backgrounds

Nov 23, 2012 by Jake
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 html.net. 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 votes
Nov 23, 2012 by WebProX
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