I’m being crazy with this thing. I’m building a Portfolio with Next.js, React and simple CSS. The layout that I want to get is this:
The Header, Nav and Footer are inside a wrapper
, and the wrapper
is inside a container
with the main
. I want to set the width
of the wrapper
as something like 30vw
but I’m not able to do it because when I set every size, it doesn’t reflect it, except when I set also the width of main
. All of this is inside a Layout
component, because it should be shared between the other pages.
.container {
min-height: 100vh;
display: flex;
}
/* --------------- WRAPPER --------------- */
.wrapper {
width: 30vw;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
}
.header {
width: 100%;
background-color: blue;
}
.navigation {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
background-color: rgb(64, 156, 156);
}
.footer {
width: 100%;
background-color: darkslategray;
}
/* --------------- MAIN --------------- */
.main {
background-color: brown;
}
Which is the problem? Here is the link to Github repo to understand better the whole.