General Question

petercostello's avatar

ajax or dom image resizing

Asked by petercostello (25points) February 16th, 2008

I have a wordpress blog http://domestik.net and import my photos from flikr. I want to make them all the same width and let the height sort itself out maintaining the original aspect ratio (you can see the images are resized on the site but squashed) . Is this possible using css and ajax or the dom. I don’t really want to have to alter the actual images, just their display.

Observing members: 0 Composing members: 0

4 Answers

Vincentt's avatar

Can’t you just set

width: 400px;

in CSS? (Of course, replacing 400px with your desired width)

petercostello's avatar

I tried this, it squashes the image. I need to maintain their original aspect ratio. Thanks anyway.

sferik's avatar

Try…
style="width: 400px; height: auto;"

petercostello's avatar

Question answered! Thanks a bunch sferik

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther