Baggyeyes (
baggyeyes) wrote in
dreamwidthlayouts2011-10-03 05:36 pm
Keep images and videos from taking over
I found this CSS snippet while trying to find a way to keep large images from swallowing the layout whole:
img, embed, object, video {
max-width: 100%
}
Vanseodesign.com: Flexible Images/
I've only tested it on my reading page, but it seems to work very well.
I hope people find this useful!
img, embed, object, video {
max-width: 100%
}
Vanseodesign.com: Flexible Images/
I've only tested it on my reading page, but it seems to work very well.
I hope people find this useful!

no subject
<img src="http://imageurl/" style="max-width: 100%;" border="0" />
I've also found max-width useful for making sure multiple images size properly, like when you have three images you want to stay together on the same line:
<img src="http://1stimageurl/" style="max-width: 33%;" border="0" /><img src="http://2ndimageurl/" style="max-width: 33%;" border="0" /><img src="http://3rdimageurl/" style="max-width: 33%;" border="0" />
So I'm very glad you reminded me about it! I'd completely forgotten you could even DO that with css. Derp.
no subject
no subject
no subject
no subject