VIEW ALL GALLERY LIGHTS

Saturday, September 19, 2009

how to resize images in your blogger post ?

helpful tip
 In your post ,if image's size larger than layout ,it will be overfloat ,and break the design of your blog .
To fix this problem ,we can set a maximum size for images in your post  .If image size larger than this value ,image will be resize automatically ,but still keep proportion .


How to do it ?

Just as this code in style section of your template . Find the line <b:skin><![CDATA[/* and insert this code right after :

img {
max-width: 480px;
width: expression(this.width > 480 ? 480: true);
border: none;
text-align: center;
}

in the code above ,480 is the maximum width of images . Set this value depend on your need .
You can change width to height to set the max-height of images .

No comments:

Post a Comment