SMF Help

SMF Support => Scripts and Tutorials => Topic started by: Brian on October 03, 2015, 09:29:05 PM

Title: Automatically re-size images in posts!
Post by: Brian on October 03, 2015, 09:29:05 PM
Here's a simple way to automatically re-size all the images in a post - add these lines to end of your theme's index.css file:

Code: [Select]
/* Auto resizing of images in posts and personal messages. */
/* Change sizing to suit your own preferences. */
.bbc_img{
   height: auto;
   width: auto;
/* This is just to keep images to a handy size, even on large screens. */
   max-height: 640px;
/* This prevents images breaking out of the post on small screens. */
   max-width: 95%;
}


/* Auto resizing of images in signatures. */
/* Change sizing to suit your own preferences. */
.signature .bbc_img {
   height: auto;
   width: auto;
   max-height: 150px;
   max-width: 95%;
}

You can change the max-width and max-height settings to suit your needs.