Jump to content

ul link style HELP!


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 post
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 post
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. Edited by Err
Link to post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...