Goodthing07 Posted April 7, 2012 Share Posted April 7, 2012 I used this to make my navigation bar <head> <style type="text/css"> ul {list-style-type:none;margin:0;padding:0;overflow:hidden; }li {float:left; }a:link,a:visited {display:block;width:100px;color:#FFFFFF;background-color:#A85200;text-align:center;text-decoration:none; }a:hover,a:active {background-color:AD3300; }</style> </head> <body> <ul><li><a href="#about">NFL</a></li><li><a href="#about">NBA</a></li><li><a href="#about">NHL</a></li><li><a href="#about">Other</a></li> </ul></body> and got the menu bar I wanted, however every link I now put in has got a coloured box around it. How can I stop this from happening. Pretty basic for ye I'm sure but I'm new here! Thanks for any help. Link to comment Share on other sites More sharing options...
eTianbun Posted April 8, 2012 Share Posted April 8, 2012 CSS ul#menu{list-style-type:none;margin:0;padding:0;overflow:hidden;}ul#menu li{float:left;}ul#menu li a:link,a:visited{display:block;width:100px;color:#FFFFFF;background-color:#A85200 text-align:center;text-decoration:none}ul#menu li a:hover,a:active{background-color:AD3300} Link to comment Share on other sites More sharing options...
eTianbun Posted April 8, 2012 Share Posted April 8, 2012 HTMLAdd: id="menu" to the menu <ul> tag. Link to comment Share on other sites More sharing options...
Goodthing07 Posted April 8, 2012 Author Share Posted April 8, 2012 Thanks, appreciate it. Link to comment Share on other sites More sharing options...
Goodthing07 Posted April 8, 2012 Author Share Posted April 8, 2012 One more question for anyone else looking here, how can I centre it if I wanted to? as in the float:left; to start the menu bar on the left and float:right; to have it from the right side... but theres no float:center; ? or at least not that I'm aware of? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.