View Single Post
Old 07-25-2014, 07:59 AM   #1
getbak
Franchise Player
 
getbak's Avatar
 
Join Date: Feb 2006
Location: Calgary, AB
Exp:
Default The problem with huge images

Every so often, someone posts an image that is massive and it screws up the format of the whole page.

I've been updating my own website and have added this simple style to my CSS so that images don't screw up page formatting on smaller screens. Images display at their normal size up to the point that they exceed the width of their container, then they shrink to stay contained.

Code:
img {
	max-width: 100%;
	height: auto;
}
Adding this to the forum's CSS should prevent those big images from screwing up the page. It won't prevent people from posting them, and it won't save the bandwidth used to download them, but at least it will stop pages from being thrown out of whack by them.

I assume you have some ability to edit the forum's CSS, and this would be a very simple edit that won't add any burden to the page and doesn't require any plugins or Javascript.
__________________
Turn up the good, turn down the suck!
getbak is offline   Reply With Quote