Say you have this html:
<div class="header"> <div class="menuContainer"> <div class="menu"> Menu </div> </div> <div class="logo">Logo</div> </div>
Your logo has a static width, and you don't want it to be a percentage width, so you can make .menu take the place between the logo and the left edge using this css:
.menuContainer { width: 50%; padding: 0 50px; margin-left: -50px; margin-right: -50px; box-sizing: border-box; position: relative; float: left; }
Remember to change this “50px” when you change the width of the logo with the media.
Here is a working example in JSFiddls: http://jsfiddle.net/3047kfkn/
source share