Is it possible to align the following 2 rows like a table ? The first row is a h2
because it is the title and the rest are lists. The first column should be quite wide but the rest can be as wide as the text inside. The columns must fill the width of the div
.
<div>
<h2 class="header1">
<span class="span1">one</span>
<span class="span2">two</span>
<span class="span3">three</span>
<span class="span4">four</span>
</h2>
<ul><li>
<span class="span5">five</span>
<span class="span6">six</span>
<span class="span7">seven</span>
<span class="span8">eight</span>
</li></ul>
</div>
div {width: 500px;}
h2 span, li span {float: left; width: auto; white-space: nowrap;}
Example: