html - Layout of three divs with fixed width -
i need position 3 divs. middle div in center has fixed width. other 2 should split equally remaining space.
my html:
<div class="menu-header" role="banner"> <div>header left</div> <div class="container">header middle</div> <div>header right</div> </div>
and css:
.menu-header{ display: table; width: 100%; } .menu-header{ display: table-cell; }
using code, left , right divs of different width, making center div lean towards left or right.
both style blocks using same class
try - .menu-header div{ display: table-cell; }
check fiddle - https://jsfiddle.net/afelixj/zq7g6plo/
Comments
Post a Comment