Charas-Project

Off-Topic => Really Old Stuff => Archive => HTML & DHTML => Topic started by: Jek on January 20, 2010, 07:36:56 AM

Title: Maximum Image Size
Post by: Jek on January 20, 2010, 07:36:56 AM
What I need is a way in either CSS or HTML to make a maximum image size for all images shown. On my forum posts, the images stretch the frame and squishes the side menu. Like here: http://gamecraft.ucoz.org/forum/11-51-1

Edit: Nevermind. I decided to do alot of research. Most of the HTML places I found required me to add a "class" to the HTML of the images for me to resize them. After searching awhile, I found a code that works for all images on the page.

Code: [Select]
<style type="text/css">
 img {
max-width: 500px;
/* Resize the image for IE6 */
width: expression(this.width > 500 ? 500: true);
}
 </style>

or just plant this in your CSS

Code: [Select]
img {
max-width: 500px;
/* Resize the image for IE6 */
width: expression(this.width > 500 ? 500: true);
}