Jump to content


center links in the middle of horizonal nav bar


6 replies to this topic

#1 zoom4267

    Young Padawan

  • Members
  • Pip
  • 191 posts
  • Gender:Female
  • Location:USA

Posted 04 June 2007 - 07:09 AM

how do i have the links in the middle of the nav bar?

thanks

Lisa

#2 Bug

    P2L Staff

  • P2L Staff
  • PipPipPipPip
  • 3,611 posts
  • Gender:Male
  • Location:Perth, Australia

Posted 04 June 2007 - 07:32 AM

Just a normal, easy to set up one would be as follows:

<div style="text-align:center;">LINKS GO HERE</div>

From that you can see that we've styled the div (placeholder) so that it will present the text (or links) from the center outwards.

#3 zoom4267

    Young Padawan

  • Members
  • Pip
  • 191 posts
  • Gender:Female
  • Location:USA

Posted 04 June 2007 - 08:30 AM

<div id="nav">
<a xhref="#">Link</a>
<a xhref="#">Link</a>
<a xhref="#">Link</a>
<a xhref="#">Link</a>

</div>

so how would i put the text align center in

Thanks

#4 Bug

    P2L Staff

  • P2L Staff
  • PipPipPipPip
  • 3,611 posts
  • Gender:Male
  • Location:Perth, Australia

Posted 04 June 2007 - 08:52 AM

In your CSS code, add the following into your #nav style

#nav {
text-align:center;
}


#5 claud1o

    Young Padawan

  • Members
  • Pip
  • 27 posts
  • Gender:Male
  • Location:South Africa
  • Interests:Web design, Print design, Musiq (rock), Art, Games, Computers...

Posted 04 June 2007 - 08:59 AM

do a inline style, like so:
<div id="nav" style="text-align: center">
<a xhref="#">Link</a>
<a xhref="#">Link</a>
<a xhref="#">Link</a>
<a xhref="#">Link</a>

</div>

or you can place it inside your id (nav), like bug did:
#nav {
text-align:center;
}

#6 zoom4267

    Young Padawan

  • Members
  • Pip
  • 191 posts
  • Gender:Female
  • Location:USA

Posted 04 June 2007 - 08:59 AM

thank you so much

#7 albinoAZN

    Albinos Are Extinct!!!

  • Members
  • PipPipPipPip
  • 1,139 posts
  • Gender:Male
  • Location:Mississippi, USA

Posted 05 June 2007 - 12:21 AM

another way you could have done it is to float it.

#nav a{
float:center;}

That will float every <a></a> tag inside the <div id="nav"> to the center.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users