Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

Click here to join us on IRC (#charas on irc.freenode.net)!



  • Charas-Project »
  • Off-Topic »
  • Archive »
  • Really Old Stuff »
  • HTML & DHTML (Moderator: De KoFfieŠ) »
  • Maximum Image Size
« previous next »
  • Print
Pages: [1]

Author Topic: Maximum Image Size  (Read 19268 times)

Offline Jek

  • Big Marshmallow Man
  • Associate
  • *
  • Posts: 189
  • Big Marshmallow Man
    • GameCraft
Maximum Image Size
« 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);
}
« Last Edit: January 20, 2010, 08:20:02 AM by Jek »
Logged

  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Off-Topic »
  • Archive »
  • Really Old Stuff »
  • HTML & DHTML (Moderator: De KoFfieŠ) »
  • Maximum Image Size
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum