I'm currently working on a React project and I'm struggling to create a CSS grid layout that keeps the "side panel" visible at all times. Being new to React, I find myself a bit confused when it comes to properly stacking elements.
Here is the code snippet:
return (
\<div\>
\<Aside /\>
\<Header /\>
\<Hero /\>
\<Middle /\>
\<End /\>
\<Footer /\>
\</div\>
);
}
For the CSS styling:
body {
margin: 0;
position: relative;
background-color: beige;
display: grid;
grid-template-rows: 1fr 1fr 1fr 1fr 1fr;
grid-template-columns: 1fr 1fr 1fr 1fr;
justify-content: center;
align-content: center;
grid-template-areas:
"aside header header header"
"aside hero hero hero"
"aside middle-display middle-display middle-display"
"aside end-display end-display end-display"
"aside footer footer footer";
gap: 0px;
height: 100%;
width: 100%; }
I've experimented with wrapping it in different sections and divs, but still haven't achieved the desired outcome.
Here is the current result: And here is the desired design I am aiming for
Your assistance is greatly appreciated!