monty 187 Posted April 7, 2007 Share Posted April 7, 2007 Guys this is probably an easy one but does anyone know how to keep list items on the same line using css?CheersMM Link to comment Share on other sites More sharing options...
boen_robot Posted April 7, 2007 Share Posted April 7, 2007 If you don't need bullets to appear, the easiest way is: li {display:inline;} If you do need them... hm... for FF and Opera is easy, but DAMN, this IE. For FF and Opera it's something like: li:before {content: •} Link to comment Share on other sites More sharing options...
monty 187 Posted April 7, 2007 Author Share Posted April 7, 2007 If you don't need bullets to appear, the easiest way is:li {display:inline;} If you do need them... hm... for FF and Opera is easy, but DAMN, this IE. For FF and Opera it's something like: li:before {content: •} Thanks a million Link to comment Share on other sites More sharing options...
monty 187 Posted April 8, 2007 Author Share Posted April 8, 2007 Thanks a millionsorry guys but I cant get each element on the same line, my css reads#menubar ul{ display:inline; text-align:right; list-style-type: none; margin: 0px;}#menubar li a{ display:inline; width: auto; height: 20px; text-decoration: none; text-align: centre; margin-right: 10px; margin-bottom: 2px; margin-top: 2px; padding: 0px; padding-left: 10px; vertical-align: middle; font-size: 14px; font-weight: bold; background-color: #FF0000; color: white;}#menubar li a:hover{ background-color: #FFFFFF; color: black;} but the elements are on different lines?Any ideas?Michael Link to comment Share on other sites More sharing options...
jlhaslip Posted April 8, 2007 Share Posted April 8, 2007 #menubar li a{ display:inline; float:left width: auto; height: 20px; text-decoration: none; text-align: centre; margin-right: 10px; margin-bottom: 2px; margin-top: 2px; padding: 0px; padding-left: 10px; vertical-align: middle; font-size: 14px; font-weight: bold; background-color: #FF0000; color: white;} Link to comment Share on other sites More sharing options...
monty 187 Posted April 8, 2007 Author Share Posted April 8, 2007 thanks, that worked great!! Link to comment Share on other sites More sharing options...
monty 187 Posted April 8, 2007 Author Share Posted April 8, 2007 thanks, that worked great!!Sorry, it worked in firefox but not in IE. Their are a few items which are in different formats in both, is this an issue with css? I usually use tables to structure data but decided I need to start using css for more control.Thanks Link to comment Share on other sites More sharing options...
jlhaslip Posted April 8, 2007 Share Posted April 8, 2007 Head over to cssplay.co.uk and check out the menus. there are a couple there that are IE6 compatible. Link to comment Share on other sites More sharing options...
msd Posted April 8, 2007 Share Posted April 8, 2007 ul{ list-style:none; margin:0; padding: 14px 0 0 315px;}li{ float:left; padding:0 5px 0 0; margin:0;} Link to comment Share on other sites More sharing options...
monty 187 Posted April 10, 2007 Author Share Posted April 10, 2007 ul{ list-style:none; margin:0; padding: 14px 0 0 315px;}li{ float:left; padding:0 5px 0 0; margin:0;} Thanks guys:) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now