- This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
Viewing 9 posts - 1 through 9 (of 9 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
i am making a responsive web design. i have a div with background image and this div is taking 100% of the body and padding bottom of 64%.it works perfectly responsive, but my problem is when i make another div with same background-image,padding bottom and 100% width and preview it in browser the hight of the first div shrinks. my question is why first div shrinks when secon div is placed just after it?
this div is taking 100% of the body and padding bottom of 64%
I’d love to know why it needs that much bottom padding.
the container div is taking 100% of the screen. that much bottom padding is to set its hight.
what i mean to say is that much bottom padding is to resolve hight issue.is there any other way to set hight for responsive background images? plz a code pen would be helpfull for responsive background image.
Dear Asma AOA, first you have to give a code pen about you problem then it will be more easy for us to solve that problem
http://jsfiddle.net/mEuEe/ here is my code.the width of the wrapper div shrinks with the browser size but not the hight whigh makes the background image elongated. how to make hight responsive?
Try using background-size: cover;