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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:59:20+00:00 2026-06-01T20:59:20+00:00

I have a container div listings_container that contains a variable number of divs listing

  • 0

I have a container div listings_container that contains a variable number of divs listing, each clearing the div before it. The container div listings_container has the CSS property overflow-x: hidden; overflow-y: auto; and a fixed width and a max-height defined.

Problem: How do I prevent the overflowed divs from taking up space? Say listings_container has a height of 30px and listing has a height of 10 px. If we have 4 or more listing inside listings_container, we the 4th listing div onwards will be hidden and a vertical scrollbar appears for listing_cotainer. The space taken up by the overflowing listing div can cause listings_containerto clear another floated div, which is what I want to avoid.

Any help really appreciated! Thanks!

  • 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-01T20:59:22+00:00Added an answer on June 1, 2026 at 8:59 pm

    Overflow content will always go beyond the boundary of the control if you leave it at auto which produces a pretty unusable effect. If you set the size of a div you typically wouldn’t want to use auto unless you know the content won’t overflow.

    Your options are either to hide or to scroll to keep the size fixed. Personally I use scroll containers for this which is basically using overflow-y: scroll; and then use a fixed height.

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

Sidebar

Related Questions

I have a container div that holds two internal divs; both should take 100%
I have a container DIV which contains several block-DIVS. Every block-DIV contains SPAN items
I have a container div that has the height of my body which is
I have a container div that holds many child divs. One of the divs
Here is my scenario. I have a container div that has (n) child elements
I have a container div that contains some img tags. When I click on
I have a container div element that has overflow:hidden on it. Unfortunately this property
I have a container div with the following CSS: #container { position:relative; overflow:hidden; width:200px;
I have a DIV container with several inner DIVs layed out by floating them
I have a container div (it has both width an height set in pixels).

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.