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;
}

7 thoughts on “How to auto resize pictures images using CSS

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 )

Google+ photo

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

Connecting to %s