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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T16:24:40+00:00 2026-05-29T16:24:40+00:00

I have a app that uses a classic email like layout like the one

  • 0

I have a app that uses a classic email like layout like the one below.

I have constructed it using the new CSS3 flexbox model and it works brilliantly until I add the ability for the user to dynamically add new items in the folders box. I would have hoped that flexbox worked in such a way that as long as there is space left in the folders box it would not begin growing into the tasks box underneath. Unfortunately this is not what I am seeing (in Chrome 17).

I have constructed a JSFiddle here that demonstrates the problem. Just click the Add Folder link and you will see the folders box growing, even though it has space enough left to accommodate the new child.

To the question. How can I construct two vertically aligned boxes using flexbox in such a way that one takes up two thirds of the available height (box-flex 2) and the other one third (box-flex 1) and that they do it in such a way that when new content is added to the first box it does not begin growing until it is out of space.

  • 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-29T16:24:41+00:00Added an answer on May 29, 2026 at 4:24 pm

    I can’t say for sure if that’s a browser bug or if it is in fact how the flex model is supposed to work. If that is how it should work I’d agree that’s not exactly intuitive!

    I found a work around by wrapping the lists in an absolutely positioned div with the overflow set to auto. This allows the flex boxes to maintain their original states and only change when the entire layout is recalculated vs. the content changing.

    Here’s the updated markup:

    <section id="folders">
       <div class="dynamicList">
       <h2>Folders</h2> 
       <ul>
          <li>Folder 1</li>
          <li>Folder 2</li>
       </ul> 
       <a href="#" id="add">Add Folder</a>
       </div>      
    </section>
    

    And the updated CSS:

    #left #tasks,
    #left #folders {
      position: relative;
    }
    
    .dynamicList {
      bottom: 0;
      left: 0;
      overflow: auto;
      position: absolute;
      right: 0;
      top: 0;
    }
    

    I forked your fiddle here to demo:
    http://jsfiddle.net/MUWhy/4/

    UPDATE:

    If you want the headings to remain fixed and only have the contents of the folder and tasks lists scroll, then I would consider putting the headings and the add buttons in their own fixed-height boxes within the #left div. It’s a bit more mark up but still pretty simple. I haven’t tried it on JSFiddle but I think that would be the best route to go.

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

Sidebar

Related Questions

We have an app that uses simple one way binding with a GridView to
I have an app that uses the navigation controls. What I would like is
I have app that uses two threads: one thread for regular application work and
I have an app that uses fragments.I'm using backward compability package with Android 2.2.
I have an app that uses the Android licensing. I'm using the ServerManagedPolicy which
I have an app that uses EF. To test my stuff I generally wrap
I have an app that uses the python/c api and I was wondering what
I have an app that uses a tableview, along with a UIButton that I
I have a App that uses the In App feature. -(void) completeTransaction: (skPaymenttransaction *)transaction{
I have an app that uses the iPhone camera and puts an overlay over

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.