I want to realize following Layout with flexbox:
You can see both orientations in the picture. Left side for the portrait view and on the right side for the landscape view.
The premise is that I want to keep my html as short as possible (if it is possible).
Is there a way to do this with flex?
In the portrait view everything just works fine because it's just one column.
Now I'm stuck at the landscape orientation.
The navigation should be on the right side of the screen and the other content on the left.
header, footer, main, nav {
margin: 5px;
padding: 5px;
border-radius: 5px;
min-height: 120px;
border: 1px solid #eebb55;
background: #ffeebb;
}
section {
display: flex;
flex-direction: column;
}
@media only screen and (orientation: landscape) {
/* no clue */
}
<section>
<header>header</header>
<main>content</main>
<nav>navigation</nav>
<footer>footer</footer>
</section>
Thank you very much for your time!