The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Using VH for background-image
Hi all,
I am experimenting with using VH for styling the background-image. I am finding that when setting this to 100vh I am seeing a gap of around 5px at the bottom of the screen.
Any ideas?
Thanks in advance.
Can you demo that?
I wouldn’t normally expect to see a background image size in vh…more like % or with a keyword.
Hi Paulie_D,
Thanks for such a quick response.
Forgive me, it’s my first Codepen. Hope this is OK.
http://codepen.io/tjgriffiths1/pen/grzVbr
You hadn’t zeroed out all the margins…a good reset CSS would have done that for you.
Then you stuck in that margin-top:-5px in the header or something…that was probably it.
margin-top:-5px
http://codepen.io/Paulie-D/pen/KzROzQ
That sorted it. You are awesome Paulie_D, as always.