If you have a parent container set to width: 100% and you have sections within that are all supposed to be equal, but the percentage is an odd number, like 16.666667%, how do you ensure it displays correctly with no breaks? What’s the limit to decimal places?
Example:
You have
<ul>
<li>One
<li>Two
<li>Three
<li>Four
<li>Five
<li>Six
</ul>
and the ul has a width of 100%, all the li are floated left. Now dividing 100 by 6 you get 16.66666666667%. If i wanted a border-right: 1px solid black; how do you factor these things in with the CSS? I can understand it’s all math, but you can’t minus 1px from a percentage (as far as I can imagine, maybe you can…)
So how do you do these things? Thanks!
Hey i think you want this you can define your ul
display:tableand define you ul li todisplay:table-cell;as like thisCss
HTML
Live demo http://jsfiddle.net/rohitazad/gjutz/1/