How can i stretch an image to cover an entire piece of padding?

How can i stretch an image to cover an entire piece of padding?
0

#1

I’m trying to figure out how to make a banner to put below my website’s nav bar, but I’m not sure how to do it without having it increase the padding width

https://codepen.io/MatthewC/pen/brQGEL


#2

Did you try width: 100%?
A codepen or something might help.


#3

https://codepen.io/MatthewC/pen/brQGEL

Yeah I’ve tried


#4

I imagine you can just use a <header>

PS. Cute website <3 :unicorn:


#5

I am confused about what you’re trying to achieve. Is it something like that?


#6

Yes exactly that. Was that achieved by the header tag that was mentioned earlier? I haven’t gotten a chance to play around with that yet


#7

The easiest way to do is by using the background-image css property. Add an empty <div> (your banner) underneath your navigation and play with background-image, background-position and background-size to achieve what you want.