Solved
Resizing in Mobile Version
Hi, I am introducing several images in html, using css styles with position (top and left coordinates) and size (height and width). Some of the images fit in the mobile size version (whatever the number of pixels you consider as mobile) and some of the images do not fit in the mobile version. The problem is that the images that do not fit in the mobile version are automatically resized; and the images that fit stay the same, causing the output look nothing like I planned. Moreover, I cannot fix it without destroying the desktop version. Is there an easy way to scale down to half all images when the the survey is in mobile size?
Thanks
Best answer by mattyb513
Perhaps what you are looking for is conditional CSS.
You can use @media queries to conditionally add CSS depending on the screen width. For reference: https://www.w3schools.com/cssref/css3_pr_mediaquery.asp
Essentially you do something like this:
```css
.picture {
width: 500px;
height: auto;
}
@media (max-width: 760px) {
.picture {
width: 250px;
}
}
```
View originalLeave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.