https://codepen.io/Aspiring/pen/yLbwrOe
.flex-container {
background-color: gray;
display: flex;
width: 100%;
height: 100vh;
}
.sidebar {
background-color: red;
border: 2px solid black;
height: 100vh;
width: 250px;
}
.topheader {
background-color: blue;
border: 2px solid black;
height: 100px;
width: 100%;
}
<div class="flex-container">
<div class="sidebar">Sidebar</div>
<div class="topheader">Head</div>
<div class="content">
<header>Hello</header>
<main>
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Magni voluptas odio repellat facilis officia
</main>
</div>
</div>
My goal is to align the div.sidebar
and div.topheader
of my layout to where they will scale correctly with my page and I can use the div.flex-container
to input the main content and articles, I'm basically making a Wiki style page for practice and understanding of flexbox. Additional information on best practice or resources other than MDN would be much appreciated.
I did additional editing in trying to solve my own issue, using what I know and got as far as the image shown... The is messy so i just left the orgianl unedited code on the codepen
Just starting flexbox and learning.