Resizing Image Width and aligning image on a wordpress blog.

The resizing of width and height attributes on images ensures fast webpage display and conserves bandwidth. Most bloggers use images to spice up their look. I am having an issue with the new image caption feature in Word Press blog. Apparently, it is automatically adding 10px to the width of the caption surrounding the image. Similarly, you may be encountering the same issue with Image Width while using Word Press blog.

The resizing image width is essential when you are adding multiple images to your blog. The default wordpress theme automatically resizes the image to the themes maximum width. But there are always problems while using this wordpress plug-in and there are no immediate solutions as they are coded. The max width attribute is still hard coded. I mainly use 500px wide images, but every now and again I need to post a smaller width image, say like the sausage dog, I can’t really used fixed width divisions because I can’t accommodate for all images.

wordpress

How Image Width Resizing is possible in Auto Mode?

You need to access your (Sample Style Sheet) style.css that is located in the wordpress theme folder and add the following code:

post img {
max-width: 530px;
width: expression(this.width > 530 ? 530: true);

}

Let us assume that an image posted in your blog was of the size 800px × 130px but it got automatically scaled down to 530px × 120px , which means that it resizes the images to the given width and height respectively. You must find the maximum width of the content part of your blog and save the dimensions in the above given code. Once saved, it starts working and resizes all the images to the given width or size dimensions. With an external style sheet (css), you can change the look of the entire site by changing one file. The custom options include colors for all layout sections. Definitely, your blog can look quite different than someone else’s.

Image Alignment

You can remove the option to float all images left or right site-wide. Instead use the WordPress editors align left or right feature when inserting an image that you want to align left or right as it is less troublesome.

2 thoughts on “Resizing Image Width and aligning image on a wordpress blog.

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>