canadabeeau Posted December 28, 2009 Share Posted December 28, 2009 I have a HTML list (ul, li, etc) that I wan to space automatically using CSS so it take up 100% width, how can I achieve this? Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted December 28, 2009 Share Posted December 28, 2009 ul {width:100%} ul li {width:100%} Quote Link to comment Share on other sites More sharing options...
canadabeeau Posted December 28, 2009 Author Share Posted December 28, 2009 If you look at this post http://www.phpfreaks.com/forums/index.php/topic,282057.0.html you will see the lines of code, where would I put it? Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted December 28, 2009 Share Posted December 28, 2009 in which ever node you want 100% you just put width:100% Quote Link to comment Share on other sites More sharing options...
canadabeeau Posted December 28, 2009 Author Share Posted December 28, 2009 I want the Company, Forefront, Solutions, Publishing and Portals to be spaced out with gaps in between so they take up 100% width (or at least the nav bar does) how can I do this? where would I put it? Quote Link to comment Share on other sites More sharing options...
vinpkl Posted December 28, 2009 Share Posted December 28, 2009 replace this ul.dropdown ul { list-style: none; margin: 0; padding: 0; color: #660000; width:19.9%; display:block; } #nav{ width:100%; } vineet Quote Link to comment Share on other sites More sharing options...
canadabeeau Posted December 28, 2009 Author Share Posted December 28, 2009 not quite vineet, almost Quote Link to comment Share on other sites More sharing options...
vinpkl Posted December 28, 2009 Share Posted December 28, 2009 not quite vineet, almost if you mean that some space is still left, then i should clear you that you cannot get your text to 100% touch the boundries. coz if my <li> width is 200px and i write <li>hello</li> then everytime there will be space left in inside of <li>. if you want to touch it from left to right then give it background color or show me online link. if background color is touching the boundries then its fine otherwise there may be some other issue. show an online link. vineet Quote Link to comment Share on other sites More sharing options...
canadabeeau Posted December 28, 2009 Author Share Posted December 28, 2009 I need the text to touch not the background (already have it touching) Quote Link to comment Share on other sites More sharing options...
vinpkl Posted December 28, 2009 Share Posted December 28, 2009 I need the text to touch not the background (already have it touching) in that case you will have to give width to each <li> individually <li style="width:15%">link first</li> <li style="width:10%">link last</li> vineet Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.