Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Fluidly Space Navigation Bar
Old 05-07-2009, 12:09 AM Fluidly Spaced Navigation Bar
Skilled Talker

Posts: 55
Name: Brian
Trades: 0
Hello,

This is my first table-less site, so go easy on me, this may be a really easy question.

http://www.transeca.com

On the above page you see the navigation bar under the header, basically I want these links evenly spaced out across 100% of the width.

Right now they are UL items in a DIV, with the below CSS:

#menu {
background: #6699FF;
background: url(../images/header_slice.png);
float: left;
list-style: none;
margin: 0;
padding: 0;
width: 100%;
}
#menu li {
float: left;
font: 67.5% "Lucida Sans Unicode", "Bitstream Vera Sans", "Trebuchet Unicode MS", "Lucida Grande", Verdana, Helvetica, sans-serif;
margin: 0;
padding: 0;
}

Any guidance would be great!
Thanks!

Last edited by bmp99; 05-07-2009 at 01:08 AM..
bmp99 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-07-2009, 03:06 PM Re: Fluidly Space Navigation Bar
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
So, divide 100 by the number of menu items you have and give each <li> a width of that percentage.

Since you have 5 items, 100/5=20% for the width of <li>
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-08-2009, 05:43 AM Re: Fluidly Spaced Navigation Bar
Skilled Talker

Posts: 55
Name: Brian
Trades: 0
Thank you! You are a life saver!

Im struggling to center the text in each <li>

I have tried everything I could think of on the <li>:

float: center;
text-align: center;
list-style-position: center; (dont think that was a valid property)

Iv also tried wrapping the <ul> tag in <center>

hmmm, any additional help is much appreciated!
bmp99 is offline
Reply With Quote
View Public Profile
 
Old 05-08-2009, 11:50 AM Re: Fluidly Space Navigation Bar
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Quote:
list-style-position: center; (dont think that was a valid property)
It's not, and the list-style property pertains to where the BULLET would go if you had bullets specified.
Quote:
Iv also tried wrapping the <ul> tag in <center>
Don't do that, it's deprecated and that's what css is for.
The reason you can't center the text is because you have float:left on #menu a. Remove the float and use text-align: center on the <ul> and you'll have centered text on your nav.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-09-2009, 12:28 AM Re: Fluidly Space Navigation Bar
Skilled Talker

Posts: 55
Name: Brian
Trades: 0
thank you hopefully by the end of this little project i will have gained a better understanding of how css is used for layout
bmp99 is offline
Reply With Quote
View Public Profile
 
Old 05-09-2009, 03:54 AM Re: Fluidly Space Navigation Bar
Junior Talker

Posts: 3
Trades: 0
thanks for this post.
by just reading and following this kind of thread helps me solve similar problem.

I also suggest googling for any css specific issues, I'm sure there will be a good guide for you.

Good luck
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
rosalesemil is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Fluidly Space Navigation Bar
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.30918 seconds with 12 queries