The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › Design › Make Image Adjust to Viuewport
I’m using the css below to set the height of the div with a class of “.intro”. It works fine for me:
padding: 0 7%;
However, i’d like to make the background image of the div to adjust to the viewport height. Any guidance appreciated. Thanksl
There isn’t an image in the code sample you provided, but have a look into the background-size CSS property.
For specific help, please create a reduced demo in CodePen using just enough HTML and CSS to clearly show any problems you’re having.