I have a two li elements that are set to 50% width and floated left. The parent container is 600px wide. As long as each of the li elements contents extends to at least 300 pixels, all is well and the li elements take up the full width of the parent.
However, when one or both of the li elements does not have enough content (text) to effect a 300px width, the elements fall short of filling the parent container.
How can I force these elements to expand to fill 50% of the parent container, regardless of their contents?
<li>This element is short</li>
<li>This element is a bit wider</li>
UPDATE: The issue here is caused by the display:inline-block on the UL element. If I change that to display:block, the elements expand to fill the available space. However, now the bottom border of the ul does not clear the floats of the li element. overflow:hidden resolves that, however introduces other issues (ie, the whole thing disappears when the h4 element is set to display:none)
display:inline-block; //needed so that bottom border clears floats
border-bottom:1px solid #ccc;
padding:0 2% 0 0;
border:1px solid red;