Auto resize image to fit client area

  • maxcr73
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
14 years 2 months ago #4708 by maxcr73
Hi,
when browser starts is there a way to fit automatically the image into the client area?

I've tried this great component but on some computers images are greater than monitor resolution so scroll bars appears on browser. Can image auto resized?

Thanks

Max

Please Log in to join the conversation.

More
14 years 2 months ago #4721 by ivan.milic
You can put image width or height to around 100%. Around is because you have parent tag padding and image margin , so 100% would be only if image margin is 0, and padding of it's parent is 0 - otherwise scrollbars appear or part of image becomes cut off depending on many things...

To preserve ratio of image you must set this only to one dimension (chose width or height)

Do this from css or using style attribute.

Please Log in to join the conversation.

Time to create page: 0.164 seconds
Powered by Kunena Forum