Create uniform height for side-by-side tables in HTML CSS
P粉044526217
P粉044526217 2023-08-01 15:18:11
0
1
336
<p>I have two or more different tables that are generated by a php loop; I want them all to have the same<li>item height for each table with different text:</p> <p><br /></p> <pre class="brush:html;toolbar:false;"><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></pre> <p><br /></p>
P粉044526217
P粉044526217

reply all(1)
P粉134288794

Not sure if this is what you want but you can easily set the height of all li items by adding li {height: 40px} in CSS

Or see the example https://codepen .io/oldskool123/pen/poQqxVK

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!