css - Resize unknown number of elements to fill width of parent container -
i need put unknown number of divs (likely limit of 5) parent container , make sure remain equally divided. i'm not sure if can done css alone figured better ask. if know 3 divs used:
<style> .menu-button { float: left; width: 33%; } </style> <div> <div class="menu-button">button x</div> <div class="menu-button">button y</div> <div class="menu-button">button z</div> </div>
seems work, if number of .menu-button divs unknown? there better way automatically adjusts horizontally?
unfortunatly think you'll have use tables this. <td>
's resize itslef fit full width.
hth
Comments
Post a Comment