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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:16:32+00:00 2026-05-27T04:16:32+00:00

I have one container div which contain 2 dynamic height (height haven’t been set)

  • 0

I have one container div which contain 2 dynamic height (height haven’t been set) divs side by side , those 2 divs are content divs , sometimes one div have more content than which cause to be more long from the other one , and those two divs have different color , in order to have Aesthetic page view i want those two divs to have equal height

how can i do this without involve javascript?

<div style="width:100px;border:1px solid black;">
    <div style="width:50px;background-color:blue;float:left;">a <br/> b</div>
    <div style="width:50px;background-color:red;float:left;">a</div>
    <div style="clear:both"></div>
</div>

live example : http://jsfiddle.net/Vbkhq/

in the example above you can see that the blue div is bigger than the red div because it contain more content , what i want to do is what ever content the other div have the both divs have equal height and be look with similar size.

thank you in advance.

  • 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-27T04:16:33+00:00Added an answer on May 27, 2026 at 4:16 am

    You can use display:table property for this:

    .parent{
        width:100px;
        display:table;
        border:1px solid green;
    }
    .child{
        width:50px;
        background:blue;
        display:table-cell;
    }
    .child + .child{background:red;}
    

    http://jsfiddle.net/Vbkhq/7/

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

Sidebar

Related Questions

I have a div container inside which there are several child divs with css
I have a main div which contains two divs. One for main content and
I have a page which has DIVs which contain short phrases (one-two words) of
I have a div container which contains 6 divs. I need to layout the
I have a couple of div elements contained in one container div , and
I have one std::list<> container and these threads: One writer thread which adds elements
I have a series of DIVs on a page which each contain a nested
I have a container div with a fix height defined. This div contains two
I have a slide show which is made up of a divs. Each Div
I have a page which will contain 4 static divs with IDs. I will

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.