How to auto resize pictures images using CSS

example

img   {
  max-width: 550px;
         width: expression(this.width > 550 ? 550: true);
         max-height: 400px;
         height: expression(this.height > 400 ? 400: true);

}

secon solution example

.resize {
width: 200px;
height : auto;
}

.resize {
width: auto;
height : 300px;
}

Advertisement

One response to this post.

  1. Posted by yoram on February 16, 2011 at 2:05 pm

    ‘Graphic Design Blog’..
    You mean, web development blog ;)

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 33 other followers