Jump to content

ul link style HELP!


XHTMLboy

Recommended Posts

Hi, i was just wondering on how to get links to go along instead of going down in css. when i do the code below.

<ul id="nav">		<li>		<li><a href="#">Home</a></li>		<li><a href="#">Clients</a></li>		<li><a href="#">Products</a></li>		<li><a href="#"> Support</a></li>		</li></ul>

i have tryed looking it up on google, but still no luck. if any of you people on here could help me i will be very happy :)

Link to comment
Share on other sites

There are 2 common techniques.1. give your <li> elements a float property, such as float:left2. change your <li> elements' display property to inline, such as display:inline or display:inline-blockI believe that doing either one of these automatically disables the bullet icon. You can check that. You may also need to adjust padding/margins to get the fit you want. I forget.

Link to comment
Share on other sites

Hi, i was just wondering on how to get links to go along instead of going down in css. when i do the code below.
<ul id="nav">		<li>		<li><a href="#">Home</a></li>		<li><a href="#">Clients</a></li>		<li><a href="#">Products</a></li>		<li><a href="#"> Support</a></li>		</li></ul>

i have tryed looking it up on google, but still no luck. if any of you people on here could help me i will be very happy :)

You have your unordered list setup wrong. You have a parent <li> and it's direct child is another <li>.You have it: <ul> <li> <li> ... etc.It should be: <ul> <li> <ul> <li> ... etc.
Link to comment
Share on other sites

@Deirdre's Dad: setting the display to inline does remove the list style.However, to override it in other situations,

li {list-style-type: none;}

Rufus

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...