html - resize children elements according to the length -
html - resize children elements according to the length -
i have next html structure
<div class="wrapper"> <ul class="list"></ul> </div>
which ul element dynamically filled li elements, when several (more 5) exceed height of wrapper element, know if there way adjust these elements container or viceversa.
so have 2 cases here:
case a
adjust objects width
of container can use:
li { display:table-cell; width:1%; }
you can check demo here
case b
adjus container size of elements can use:
ul { white-space:nowrap; display:inline-block; } li { display:inline-block; }
you can check demo here
also options can have other variations depens on needs contents.
html css
Comments
Post a Comment