computermax2328 Posted December 23, 2012 Share Posted December 23, 2012 Hello All, I was wondering if anyone had some fluid techniques for nav bars. I want to evenly distribute each li in the nav bar and have them be fluid. Structure like the following: <nav id="nav" class="width"> <div id="slide" class="body"> <ul id="bar"> <li><a href="#">NEWS</a></li> <li><a href="#">SPORTS</a></li> <li><a href="#">OPINION</a></li> <li><a href="#">LIFESTYLES</a></li> <li><a href="#">A&E</a></li> <li><a href="#">BLOG</a></li> <li><a href="#">ABOUT</a></li> </ul> </div> </nav> the width class is 100% and the body is 80% centered with the margin 0px auto. I need to know the padding for each li to make it fluid and evenly distributed through the ul bar. Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/272303-nav-bar-even-distribution/ Share on other sites More sharing options...
Love2c0de Posted December 23, 2012 Share Posted December 23, 2012 Can you post your CSS? Without seeing it, I'd suggest declaring a text-align: center; on your <ul> (this will make your <li>'s sit in the center of your <ul>) Give your <li>'s a global padding style of whatever you want, i.e 10px. Declare a text-align: center on your <li>'s too. Regards, AoTB. Link to comment https://forums.phpfreaks.com/topic/272303-nav-bar-even-distribution/#findComment-1400967 Share on other sites More sharing options...
kjetterman Posted December 27, 2012 Share Posted December 27, 2012 You will want to make sure that your padding is even. Link to comment https://forums.phpfreaks.com/topic/272303-nav-bar-even-distribution/#findComment-1401609 Share on other sites More sharing options...
Muddy_Funster Posted December 28, 2012 Share Posted December 28, 2012 JQueryUI - FTW!! muhahahaha. No, but seriously, it's got a lot of nice features and you can take advantage of most of the visual stuff just by using the css it gives you, no JS required Link to comment https://forums.phpfreaks.com/topic/272303-nav-bar-even-distribution/#findComment-1401774 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.