I have two, or more, different tables that are generated by a php loop; I want to make them all the same <li>
item height for each table with different text:
<div class="table-1">
<ul>
<li>short text1</li>
<li>short text1</li>
<li>long text1 long text1 long text1 long text1 long text1 long text1 </li>
<li>short text1</li>
</ul>
</div>
<div class="table-2">
<ul>
<li>short text2</li>
<li>long text2 long text2 long text2 long text2 long text2 long text2 </li>
<li>short text2</li>
<li>short text2</li>
<li>short text2</li>
</ul>
</div>
2
Answers
Not sure if this is what you were looking for but you could easily set the height for all li items by adding this to your CSS
li { height: 40px }
Or see example https://codepen.io/oldskool123/pen/poQqxVK
To display the table side by side you have to add some
display:flex
to the list. Refer below code…HTML:
CSS:
Border added for visual purpose.
Hope this solution works for you.