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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:07:26+00:00 2026-05-28T07:07:26+00:00

I have a table where the cells have a fixed height. Within the table

  • 0

I have a table where the cells have a fixed height. Within the table I have a div which has a fixed height as well, and if that height exceeds the cell height, I would like it to overflow out of the cell, without the cell height extending (not a layout I would normally want to build, but it is a given start point at the moment).

For example:

<table>
    <tr>
        <td>
            <div>
                12345
            </div>
        </td>
        <td></td>
    </tr>
</table>

table
{
     width: 90%;
     margin: 10px;   
}

td
{
    width: 50%;   
    border: 1px solid blue;
    padding: 5px;
    height: 100px;
    vertical-align: top;
}

div
{
    height: 250px;
    width: 75%; 
    border: 1px solid red;
}

This resulted the table cell height to extend according to the div height.

I tried adding position: absolute to the div, and position: absolute to the td, and that did the trick in Chrome and IE (see this jsFiddle example):

However, in Firefox the position: absolute caused the width of the div to relate to the window width instead of the cell width:

How can this be fixed? I’m looking for either a solution other than the position: absolute, or a way to get the div width right in FF.

  • 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-28T07:07:26+00:00Added an answer on May 28, 2026 at 7:07 am

    You can achieve what you need using an extra div inside the table cell:

    CSS:

    table
    {
         width: 90%;
         margin: 10px;   
    }
    
    tr
    {
        height: 100px;
    }
    td
    {
        width: 50%;   
        border: 1px solid blue;
        padding: 5px;
        height: 100px;
        vertical-align: top;
        position: relative;
    }
    
    div.outer {
        height:100px;
        max-height: 100px;
        overflow: visible;
        width: 100%;
    }
    
    div.inner
    {
      height: 250px;
      width: 75%;
        border: 1px solid red;
    }
    

    HTML:

    <table>
        <tr>
            <td>
                <div class="outer">
                    <div class="inner">
                        12345
                    </div>
                </div>
            </td>
            <td></td>
        </tr>
    </table>
    

    I forked your jsfiddle to demonstrate: http://jsfiddle.net/dyes5/1/

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

Sidebar

Related Questions

I have three columns which are div s acting like table cells, one in
I have a table full of cells and i would like to get on
I have an access table which has some cells as blank ( no data
I have an HTML table which has equally divided rows and columns. I would
How can I have fixed height for table cells in Firefox? The following works
I have set up a nice table with fixed height and weight like this:
I have a table in a HTML form. It has a fixed height for
I have a table and I need that every cell have the same fixed
Let's say I have a table cell with fixed width and height.... and I
I have an HTML table which has incrementing numbers starting from 0 in its

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.