how to put the height of the images when i get responsive the image is not be its actual place what should i do for responsive look???
Can you show us what you have so far? Do you have a codepen (or something similar) that you can give us a link to?
Also, you can google ācss responsive imagesā to find a ton of articles on how to do this but Iāll save you the trouble and link to a good article.
https://codepen.io/sunny-roy-the-vuer/pen/gOmpKmeā¦
Respected Sir, This is the link of my documentā¦I have not put any Responsive Property in this cssā¦Acutally,the Issue that iām facing that the header image which is at line 10in css and banner image which is in 90line in css⦠when i minimize thereās gape between the header image and banner imageā¦Kindly resolve my issue Please ā¦And tell me how to put the image height for responsive with example.Kindly,Sirā¦Thank Youā¦! @bbsmooth
Iām not sure I understand completely, but if you want the height of the background image in the header to be responsive then you just need to add another 100%
to the background-size
:
background-size: 100% 100%;
Now as to whether you should do this? Well, give it a try, make sure to change the height of your browser from really short to really tall. Iām not sure the woman in that pic will appreciate being put on the rack like that
For mid-sized viewports/tablets, this could work:
#header {
width: 100%;
height: 40vw;
background-image: url("https://i.ibb.co/gmpr5cS/header.jpg");
background-size: cover;
background-repeat: no-repeat;
}
So, setting the background-size to ācoverā and adjusting the height depending on the width. This wonāt work for smartphones, though. For narrow viewports. maybe something like this:
#header {
height: 90vh;
background-size: cover;
background-position:top right;
}
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.