How would i go about making the hero fill ONLY 80% of the page?
I want the hero to take up the entire top visible page, no matter the size, and the Stencil image to be centered at all times but i can not figure out how to do that. any help?
![](https://utfs.io/f/bb556692-9414-4f12-86ab-f516c85cc3ba-1nq2cb.png)
![](https://utfs.io/f/a2a0d59e-e37f-4dd9-95c1-22add387927f-1nq2cb.png)
![](https://utfs.io/f/13438419-80cc-4972-ba0d-2355f7732e6f-1nq2cb.png)
![](https://utfs.io/f/4bd7d3e0-bcb7-4e0b-abfa-65068a86f069-1nq2cb.png)
4 Replies
i forgot to add the height on there, but the same issue still occurs,
![](https://utfs.io/f/c0dabac7-75fa-464d-99cc-6fc8f4509baf-1nq2cb.png)
there are a few issues
- your <header> is in the <head> section instead of the <body>
- you use margins where a padding on the parent is sufficient
- there is no min-height set on the header, so it doesnt know how large it should be to fill the screen
- you have some properties set on the * wildcard selector, where it is enough to set it on the body alone (it will cascade down to other element)
i made a few changes to make it work
- html/body height 100%;
- nav and hero inside the header (min-height 100%)
- display: grid on the header with the nav position sticky top
- hero : diplay grid to center the image
https://codepen.io/MarkBoots/pen/KKBRaWX
it can be cleaned up more, but i think this already helps you
thank you