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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:22:48+00:00 2026-06-16T00:22:48+00:00

Well I have such simple divs structure: <div id=wrapper> <div id=1 class=block> 1 </div>

  • 0

Well I have such simple divs structure:

<div id="wrapper">
    <div id="1" class="block">
    1            
    </div>
    <div id="2" class="block">
    2
    </div>
</div>

JS Fiddle

Content of #1 can dynamically changed by javascript and its height can be changed depended of content. What I want is to make #2 the same height as #1. I understand that I can use javascript for this purpose but I suggest there must be some not such tricky way to make those divs’ heights equal using only CSS and/or changing divs’ positioning some how.

  • 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-16T00:22:49+00:00Added an answer on June 16, 2026 at 12:22 am

    To expand on my comment, you can’t do it semantically. You have to use a little trick to fake the 100% height. It’s called faux columns, and you can read more here.

    In your case, we can fake it by adding a few background divs:

    <div class="background bg1"></div>
    <div class="background bg2"></div>
    

    Then changing your CSS like so:

    #wrapper {
        border: 1px solid black;
        position: relative;
    }
    
    #wrapper:after {
        display: block;
        content: " ";
        height: 0;
        clear: both;
    }
    
    .block {
        position: relative;
        float: left;
        vertical-align: top;
        width: 200px;
        text-align: left;
        min-height: 200px;
        padding-left: 20px;
        z-index: 2;
    }
    
    .background {
        position: absolute;
        top: 0;
        bottom: 0;
        width: 200px;
        z-index: 1;
    }
    
    .bg1 {
        background-color: #eee;
    }
    
    .bg2 {
        left: 200px;
        background-color: #aaa;
    }​
    

    Here’s a working jsFiddle.

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

Sidebar

Related Questions

Well, it's simple as that. How can i play video (such as mp4) within
I have looked at a few of the well-known AOP-oriented frameworks for .Net such
Well i have a div tag that i show as a modal dialog this
Well i have a transparent div or the background is set to transparent :)
I have created a simple app and this is my folder structure lib/book.rb lib/user.rb
I have a simple Ability.rb set up listed below: if user.role? :super_admin can :manage,
Let's say I have the following simple class: import cherrypy import os class test:
I'm struggling to get my head around such simple Math, well at least it
I am using Delphi 2009. I have a very simple data structure, with 2
Well, for example I have some simple console application. My purpose is to generate

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.