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

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -