son Posted January 17, 2010 Share Posted January 17, 2010 I have a horizontal nav bar as<ul class="top"><li><a href="index.php" title="Home">Home</a></li><li><a href="about.php" title="About">About</a></li><li><a href="contact.php" title="Contact">Contact</a></li></ul>and would like to change background color for hover. I have it working in general, but how do I make it fill out the whole height of ul (class top)? Tried few things, but all not working...Son Link to comment Share on other sites More sharing options...
Ingolme Posted January 17, 2010 Share Posted January 17, 2010 Are your floating your <li> elements? Link to comment Share on other sites More sharing options...
son Posted January 17, 2010 Author Share Posted January 17, 2010 Are your floating your <li> elements?No, all just display inline. Have not styled much else...Son Link to comment Share on other sites More sharing options...
Ingolme Posted January 17, 2010 Share Posted January 17, 2010 What does it look like currently and how do you expect it to look? Link to comment Share on other sites More sharing options...
son Posted January 17, 2010 Author Share Posted January 17, 2010 What does it look like currently and how do you expect it to look?Just got it working (and now have to figure our how to make it with a nice gradient;-)..Use now:* {border:none; margin:0; padding:0; list-style-type:none;}.nav {width:800px;background-color: #999; margin-bottom:20px;}.nav ul li {float:left;}.nav ul li a {display:block;padding:8px 14px;background-color:#999; color:#FFF;font-weight:normal;}.nav ul li a.current {background-color:#262261;color:#FFF;}.nav ul li a:hover {background-color:#262261; color:#FFF;} for css and <div class="nav"><ul><li><a href="index.php" title="Home">Home</a></li><li><a href="about.php" title="About">About</a></li><li><a href="contact.php" title="Contact">Contact</a></li></ul></div> Many thanks. The mention of 'float' certainly helped my brain to think of a solution...Son Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.