I'm trying to make the logo take full width instead of leaving a white background around it.
body { text-transform: capitalize; margin: 0; } .page { background-image: url(./hero-bg.jpg); display: grid; height: 100vh; grid-template-columns: 10% auto; grid-template-rows: 15% auto auto auto; grid-template-areas: "logo header header header" "sidebar section section section" "sidebar main main main " "sidebar footer footer footer"; } .logo { grid-area: logo; background-color: rgba(255, 0, 0, 0.55); }
<div class="page"> <nav> <ul> <li><a href="#">home</a></li> <li><a href="#">about</a></li> <li><a href="#">policy</a></li> <li><a href="#">contact</a></li> </ul> </nav> <h1 class="logo">Batoot</h1> <aside>sidebar</aside> <section>section</section> <main>main content</main> <footer>footer</footer> </div>
I tried changing the grid template area properties but it didn't solve my problem
If I were doing this, I would just set the columns and rows where you want them, and leave out those areas.
I added some borders and background color just to illustrate where things are.