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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:22:52+00:00 2026-06-14T04:22:52+00:00

I have two side-by-side <div> blocks that are both contained in a larger <div>

  • 0

I have two side-by-side <div> blocks that are both contained in a larger <div> block. I’d like the smaller of the two child <div> blocks to take up all remaining vertical space of the parent block, without actually knowing the height of the parent.

Is this possible to do without any Javascript?

In this example: http://jsfiddle.net/5J8Em/2/ I’d like the red <div> to be just as tall as the blue one.

  • 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-14T04:22:54+00:00Added an answer on June 14, 2026 at 4:22 am

    Try using display:table; for parent element and display: table-cell; for children:

    HTML:

    <div id="a">
        <div id="b">
            hello world 
        </div>
        <div id="c">
            hello world hello world hello world 
            hello world hello world hello world 
        </div>
    </div>​
    

    CSS:

    #a {
         background-color:rgb(100,100,100);      
         width:200px; 
         display:table;
    }
    
    #b {
         background-color:red; 
         vertical-align:top;
         display: table-cell;
    }
    
    #c {
         background-color:blue;   
         width:100px;
         word-wrap:break-word;   
         display: table-cell;    
    }
    

    Here is the jsFidde demo

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

Sidebar

Related Questions

I have two divs that I would like to be side-by side if the
I am trying to set two side-by-side divs contained by a single larger div
I have a webpage with two side by side overflowing divs that split the
I have two doubts: 1. I would like to add some client side support
Background: We have two directories of Crystal Reports for both the web side of
I would like to have two tags side-by-side as if being two columns. So
I have two <div> s on my page. I want to arrange them side-by
I have two columns, the left side div is a navigation bar and it
I'm trying to create two side-by-side div elements, but I found that having an
I have managed to put two divs side by side using a <div class=clear></div>

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.