how do i have the links in the middle of the nav bar?
thanks
Lisa
center links in the middle of horizonal nav bar
Started by zoom4267, Jun 04 2007 07:09 AM
6 replies to this topic
#1
Posted 04 June 2007 - 07:09 AM
#2
Posted 04 June 2007 - 07:32 AM
Just a normal, easy to set up one would be as follows:
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.
<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
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
<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
Posted 04 June 2007 - 08:52 AM
In your CSS code, add the following into your #nav style
#nav {
text-align:center;
}
#5
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;
}
<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
Posted 04 June 2007 - 08:59 AM
thank you so much
#7
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.
#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
