html - HTML5 layout issue with select list and buttons -


i trying layout few div elements. div element hosts select element , 3 buttons. while don't want set specific size buttons, wish select list occupy remaining space.

list stretched without spacing

as can see, kind of list stretch without spacing. tried force padding through css without luck. missing something.

here code:

#presets {      display: flex;      padding: 3px;      margin: auto;  }    #presets select {      width: 100%;   }    #presets button {     padding-right: 5px;  }
<div id="presets">        <select>            <optgroup ng-repeat="item in qo.presets">                 <option>{{item.name}}</option>            </optgroup>        </select>        <button>rm</button>        <button>ed</button>        <button>ad</button>  </div>

thanks in advance hints,

it should working following stylesheet:

#presets {     display: flex;     padding: 3px;     margin: auto; }  #presets select {     margin-right:5px;     width: 100%;  }  #presets button {     margin-right:5px; }  #presets button:last-child {     margin-right: 0; } 

use margin instead of padding.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -