I am trying to float a div to the side of a CSS grid I have laid out. However, it keeps getting pushed below the grid. I have tried both float and inline-block with no success.
The html:
<div class="body-wrapper">
<div class="grid-wrapper">
<div class="logo"><img src="Logo.png" alt="ChessHero.io Logo" width="300" height="300"></div>
<div class="title"><h1>TITLE</h1></div>
<div class="menu"></div>
<div class="image"><h1>IMAGE</h1></div>
<div class="feature"><h1>FEATURE</h1></div>
<div class="padding"></div>
</div>
<div class="menu-div">TEST</div>
</div>
The stylesheet:
body, html {
height: 130%;
width: 100%;
margin: 0px;
padding: 0px;
}
.body-wrapper {
float:left;
overflow:hidden;
}
.grid-wrapper {
display: grid;
grid-template: .5fr .5fr 2fr 2fr /repeat(10, 1fr);
grid-template-areas:
"l l t t t t t t m m"
"p p i i i i i i m m"
"p p i i i i i i m m"
"p p f f f f f f m m";
grid-gap: 3px;
float:left;
}
.menu-div{
height:100vh;
width:10%;
background-color:green;
float:left;
}
Pages I've read & tried:
CSS two divs next to each other
How to place two divs next to each other?
How do I align spans or divs horizontally?
Any help is much appreciated.