Jump to content

html links on single line

- - - - -

  • Please log in to reply
3 replies to this topic

#1
BRUTAL

BRUTAL

    Newbie

  • Members
  • PipPip
  • 22 posts
Hey guys i designing a site and im trying to have a options bar like this

Home reviews tips forums

ive gotten the home on a single line using the <DD> thing but when i try to put review in there it doesnt go as far as i need it to and when i try to add another space it goes over to another line. ps if you guys need to see my code then just ask

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
Hi, <dd> tag is a definition list, and usually by default it goes onto another line, maybe try wrapping them in <span> tags instead!

Feel free to show us your code so we can see what works.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts
you should have valid xhtml markup so this is the solutions
<ul>

<li>link1</li>

<li>link2</li>

<li>link3</li>

</ul>


#4
fazlerocks

fazlerocks

    Newbie

  • Members
  • PipPip
  • 12 posts
Add the following code with an additional CSS design.
Step 1: Add the links like below at the desired location
<div id="nav">

<ul>

<li><a href"#">link1</a></li>

<li><a href"#">link2</a></li>

<li><a href"#">link3</a></li>

</ul>

</div>

Step 2: Create a new file known as stylesheet.css and include it in the header of main page.

Step 3: Add the following code to stylesheet.css
#nav li

{

float:left;

}

Hope it works for you!

Best Wishes!! :)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users