+ 2
How to make images as wide as screen(web)☺️
In my websites I placed many images and I set it's width and height according to width of my device 350px but when I tilt the device to landscape it doesn't seems to match to my new screen width why please tell me how to do it.😭😖😅😅😅😅😂look at it if you're using a laptop to view this site you'll know the problem images are not big 👇 https://code.sololearn.com/WY3h0dSXISDh/?ref=app
3 ответов
+ 2
Hay bro just replace 350px with 100% it will work fine . Try it
0
Atomic Wave ~⚛ add all of your image a specific class (ex:rp-img). Then add these css rules
.rp-img{
Width:100%;
height:auto;
}
0
Use css viewport relative units: vw, vh, vmin, vmax...
https://developer.mozilla.org/fr/docs/Web/CSS/length
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units
https://developer.mozilla.org/en-US/docs/Web/CSS/Viewport_concepts