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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T01:15:14+00:00 2026-06-17T01:15:14+00:00

I am using display: table and display: cell to have 3 column layout with

  • 0

I am using display: table and display: cell to have 3 column layout with equal heights.

Here’s my code,

HTML:

<div id='wrapper'>
 <aside class='column'>Left sidebar</aside>
 <div id='main' class='column'>
     <textarea rows="2"></textarea><br>Main content <br>
     <br><br><br>
 </div>
 <aside class='column'>Right sidebar</aside>
</div>

CSS:

#wrapper {
    display: table;
}
aside {
    background-color:#EEE;
    margin:0;
    padding: 0;
}
.column {
    display: table-cell; 
}

JS

$('textarea').focus(function () {
    $(this).attr('rows',8);
});

Here’s the demo

Now,

When I focus on textarea, height of textarea increases, and thus the height of div#main increases too. This adds a padding-top to both aside‘s.

I am not sure if display:table and display:cell is the reason behind it, but I am not able to figure out the issue.

  • 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-17T01:15:15+00:00Added an answer on June 17, 2026 at 1:15 am

    While I was writing this question, I figured out the issue, so sharing it to help others.

    By default, the html element with display: cell has vertical-align: middle.

    So, whenever height of one cell increases, content of other cell shifts because of vertical-align:middle. ( It was not a padding-top but vertical-alignment at middle of cell )

    So, to fix the issue,

    I added this to my css,

    .column {
        display: table-cell; 
        vertical-align: top;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a layout built using CSS display:table (inline, row, cell, etc). I'm doing
I am using this table-plus macro with Confluence : http://confluence.atlassian.com/display/CONFEXT/Table-plus+macro Can I have cell
I have the following table layout which I'm using to display image buttons in
I have added checkbox in display table using decorator class as shown in below
I have a table from which I query data to display resultset using stored
I have a HTML table as given in the following code. This has 16
Note: In some situations elements with display:table-cell; have space at the top that is
I have a table that has a column that contains links. Each cell in
I have a problem using the display: table features of CSS. I am getting
I have a web application and I am using the CSS display: table. I

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.