Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7420801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:18:09+00:00 2026-05-29T08:18:09+00:00

I am trying to have images resize proportionally to their containing elements, the only

  • 0

I am trying to have images resize proportionally to their containing elements, the only problem is that I am struggling to get the height of each image container to resize proportionally to it’s changing width on window resize, each image container’s width is set to 25% of the main container element’s width.

What I need to happen now is for each image container to resize proportionally when the window resizes, and to have each image inside it’s respective container grow with it, but keep it’s aspect ratio.

Here is what I have thus far, http://jsfiddle.net/pPWVd/ .

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T08:18:10+00:00Added an answer on May 29, 2026 at 8:18 am

    I have modified your fiddle ( http://jsfiddle.net/pPWVd/5/ ) to reflect the idea of what you describe. The key to maintaining an aspect ratio is to only set one dimension (width or height). Also, I set the display of item to block since it is getting a width and being floated.

    Depending on your situation, you really don’t need the extra div wrappers to achieve the effect, see http://jsfiddle.net/pPWVd/7/. Though if you are putting other stuff in the item then you will want to keep it as you had it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have css hover over images for my tabs and I'm trying to get
Im trying to write something to get my images to show correctly. I have
I have an annoying CSS layout problem. I'm trying to float images on a
I have been trying(in vain) to build a page whose elements would resize as
I am trying to resize an image that I have uploaded with a form.
I am trying to have one one layer, and center images within. I.E., if
I have converted .jpg images into a bitmap thumbnail. What I am trying to
What I am trying to do is have rows of images, 6 images in
I am trying to upload multiple images and I have a jquery plugin set
I'm trying to do the following: I have a set of images and select

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.