Very typical header consisting of "LOGO | MENU | ICON" needs to respond to "LOGO | ICON" in a row, with MENU below that row.
I tried Flexbox but I don’t see anything that can bump down the middle box (in this case, the menu).
div#left {
width: 397px;
float: left;
background: red;
color: white;
}
div#middle {
min-width: 955px;
float: left;
background: gray;
color: white;
}
div#right {
width: 88px;
float: left;
background: blue;
color: white;
}
<div id="left">LOGO</div>
<div id="middle">MENU</div>
<div id="right">ICON</div>
http://brinsterinc.com/three_column_responsive.html
I need the MENU to move below the LOGO | ICON when the window is not wide enough to show everything. Thanks!
2
Answers
https://developer.mozilla.org/en-US/docs/Web/CSS/order is what you’re after. Consider looking at a framework like Tailwind or Bootstrap too.
Perhaps flex can work with the sizes and a wrap. No need for the floating with the
space-between
thenNote I also used classes rather than id’s to style as a more flexible pattern – and have a header element wrapping it for the style.