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 7942757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:04:05+00:00 2026-06-04T00:04:05+00:00

I am constructing a horizontal scroll gallery that looks something like <ul class=’scroll’> <li

  • 0

I am constructing a horizontal scroll gallery that looks something like

<ul class='scroll'>
<li class='img'>
<img/>
</li>
</ul>
<li class...

The supporting CSS looks like:

.img {
float: left;
display: inline;
height:90%;
width:auto;
}

.scroll {
    display:block;
    max-height:800px; 
    height:100%
}

.img img {
    margin:5px 10px;
    float:left;
    max-height:100%;
    height:auto;
    width:auto;
}

At the moment it works great. On load the images resize and max out at 800px height. However what is really bugging me is when I resize a window to a smaller (or from smaller to larger) the li.img does not resize with the image, meaning you are left with either huge white borders or overlapping images.

If I select the image with INSPECT ELEMENT in chrome it all magically jumps into place.

I was wondering if there was a JQUERY solution that forces the browser to redraw the LI tag on resize (like opening Inspector does) or any other ways to lock the LI to the contained IMG width?

  • 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-06-04T00:04:06+00:00Added an answer on June 4, 2026 at 12:04 am

    You could use

    $(window).resize(function(){
      ...
    });
    

    and call a function which calculates the correct height.

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

Sidebar

Related Questions

I'm constructing a regex that is looking for dates. I would like to return
I'm currently constructing loggers (with configgy) like this: class MyClass { private val log
I am constructing enum values that have a data structure like the following: enum
I'm constructing a [CalendarDay] which looks like this newtype CalendarDay = MKCal (Either AvailableDay
We are constructing an application that will be interacting with Exchange 2007 calendar functions.
What is a culture-invariant way of constructing a string such that the Javascript Date()
I'm constructing an area with selectable buttons that transition and appear every 10 frames.
I am constructing a search function in a class to be used by several
Im constructing an array of objects like this: var postData = []; $.each(selectedFields, function
i'm constructing a web-service that is used, in this particular case, to ask for

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.