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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:22:09+00:00 2026-05-13T14:22:09+00:00

I have two columns side by side that are different colors. The background has

  • 0

I have two columns side by side that are different colors. The background has a unique color as well. The right column contains text that will expand to an unknown height. The other column contains little to nothing.

<div id="container">
    <div id="leftColumn">
        <p>Only one small paragraph here</p>
    </div>

    <div id="rightColumn">
        <p>Many large paragraphs inside here.</p>
    </div>
</div>

I would like the left column to be the exact height as the right column.

Here’s the CSS…

#leftColumn {
    display:inline-block;
    width: 200px;
}
#rightColumn {
    display:inline-block;
    width: 600px;
    vertical-align: top;
}

So when the page loads I use jQuery to set the height of the left column based on the height of the right column.

$(document).ready(function() {
    $('#leftColumn').css('height', $('#rightColumn').innerHeight());
});

Is there a way to do this with only CSS?

  • 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-13T14:22:09+00:00Added an answer on May 13, 2026 at 2:22 pm

    There are a few other ways to achieve this layout besides using Javascript.

    Methods include:

    • Using display:table on the elements
    • Faux columns (background image on the parent element)
    • Adding multiple div containers for each background
    • Use a table (not very popular for obvious reasons)

    All of these have different advantages, drawbacks and each introduces thier own headaches to the development of the site. I’d vote for using faux columns because it keeps the html the simplest and is compatible with all browsers.

    Additional reading:

    • http://buildinternet.com/2009/07/four-methods-to-create-equal-height-columns/
    • http://www.alistapart.com/articles/fauxcolumns/
    • http://www.code-sucks.com/css%20layouts/faux-css-layouts/
    • http://www.addedbytes.com/articles/faux-columns-for-liquid-layouts/
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background: We have two directories of Crystal Reports for both the web side of
I have a table with many columns. One of the columns contains a cell
I have two tables (groups and parties) in a many to many relationship using
The way I do 80-column indication in Vim seems incorrect: set columns=80 . At
In my application i have the following classic template on 3 columns ********************************************************* *
I have a boolean column in one of my tables (value is either 0
I've got an interesting design question. I'm designing the security side of our project,
As part of a data regression and quality assurance exercise, I need to look
I'm trying to stray away from using tables to form the layout of my

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.