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

  • Home
  • SEARCH
  • 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 6646949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:28:46+00:00 2026-05-26T00:28:46+00:00

I have two layout elements lets say one is 33%, the other 66%. They

  • 0

I have two layout elements lets say one is 33%, the other 66%. They both use 100% of my screen size (So it is dependent on browser window). The smaller element also has a min-size property, so it cant fall below 250px;

Now if the layout is at least 757px large (so the size where the min property doesn’t apply) everything looks fine. If the layout falls below the 757px the second element starts to overflow since it still takes the 66%, so the sum of both layouts exceeds the 100%.

I made some graphics to show the behavior:

Layout 1000px not overflowing:Layout 1000px not overflowing

Layout 500px overflowingLayout 500px overflowing

Is there a solution to prevent the overflow (not overflow: hidden) so the second element takes only the remaining space when the first element reaches it’s min width.
Also JavaScript shouldn’t be used excessive!

Regards, Stefan

  • 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-26T00:28:46+00:00Added an answer on May 26, 2026 at 12:28 am

    Sure, this is actually pretty easy and requires a very minimal amount of code:

    HTML:

    <div class="sidebar">
    ...
    </div>
    <div class="content">
    ...
    </div>
    

    CSS:

    .sidebar{ 
        float: left;
        width: 33%;
    }
    .content { 
        overflow: hidden; /* Ensures that your content will not overlap the sidebar */
    }
    

    You can view the live demo here: http://jsfiddle.net/7A4Tj/

    Edit:

    If you’re trying to achieve a site layout that has equal-height background images for the sidebar and content, all you need to do is wrap both those elements in a containing div and use the Faux Columns technique.

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

Sidebar

Related Questions

I have two layouts, one is the main layout inside which I am including
I have a layout with two fragments and both fragments have their own action
I have a JFrame with null layout and two one character JLabels on the
I have a simple page layout with two divs--one on top, and one on
I have a layout that contains two ImageViews. I want one of them to
I have two UILabels in a XIB file, one on top of the other,
I have two libraries and a single application assembly project layout and I'm wondering
I have two panels: main_panel child_panel The main_panel layout is set using: main_panel.setLayout(flowlayout) I
Here is the scenario: I have two asp pages. a.aspx is layout and b.aspx
How to automatically switch the background in layout android:background=@drawable/image> I have two pictures I

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.