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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:30:29+00:00 2026-05-27T15:30:29+00:00

This should be simple. I am trying to get a grey bar in a

  • 0

This should be simple. I am trying to get a grey bar in a <td> of a table to expand to the full height of the rest of the <tr>. The problem is that the rows and cells are not fixed height.

I’m a believer in table-free layouts, so no need to convert me. I am stuck with a table in this case, so I need to work with it and treat it nicely.

Here’s the HTML:

<table>
    <tr><td>
            <div class="bar"></div>
        </td>
        <td>
            please<br/>
            help<br/>
            me<br/>
            stack<br/>
            overflow<br/>
        </td>
    </tr>
</table>

And the CSS:

td {
    border: 1px solid black;
}

.bar {
    background: #eee;
    width: 10px;
    height: 100%;
    min-height: 100%;
}

Here’s a fiddle: http://jsfiddle.net/DKQVG/4/

  • 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-27T15:30:30+00:00Added an answer on May 27, 2026 at 3:30 pm

    Working version with just CSS changes: http://jsfiddle.net/wLtCd/1/

    Basically, your TD should have a height defined, so a percentage height makes sense for its child nodes.

    Secondly, your div needs to have a display property of 'table'

    Full CSS:

    td {
        width: 100px;
        border: 1px solid black;
        height: 100%;
    }
    
    .bar {
        background: #eee;
        width: 10px;
        height: 100%;
        min-height: 100%;
        display: table;
    }
    

    You can remove the width part from above.

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

Sidebar

Related Questions

This should be really simple. I am using SSMS 2008, trying to get a
I am having the hardest time trying to figure out this (should be) simple
From the should be simple, but... files: Trying to get started with jQuery UI.
This should be simple, but I'm shredding my hair just trying to think how
This should be a very simple case, but I am pulling hair trying to
This should be dead simple, but I cannot get it to work for the
This should be a simple one. I had another codebase that this worked but
Okay, this should be simple, but I just can't get it to work. I
Hey guys, this should be quite simple to answer.... Im using XSB Prolog...trying to
This should be simple, but I just can't get it to work My list

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.