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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:12:39+00:00 2026-06-03T15:12:39+00:00

I have an indeterminate number of table-cell elements inside a table container. <div style="display:table;">

  • 0

I have an indeterminate number of table-cell elements inside a table container.

<div style="display:table;">
  <div style="display:table-cell;"></div>
  <div style="display:table-cell;"></div>
</div>

Is there a pure CSS way to get the table-cells to be equal width even if they have differently sized content within them?

Having a max-width would entail knowing how many cells you have I think?

  • 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-03T15:12:41+00:00Added an answer on June 3, 2026 at 3:12 pm

    Here is a working fiddle with indeterminate number of cells: http://jsfiddle.net/r9yrM/1/

    You can fix a width to each parent div (the table), otherwise it’ll be 100% as usual.

    The trick is to use table-layout: fixed; and some width on each cell to trigger it, here 2%. That will trigger the other table algorightm, the one where browsers try very hard to respect the dimensions indicated.
    Please test with Chrome (and IE8- if needed). It’s OK with a recent Safari but I can’t remember the compatibility of this trick with them.

    CSS (relevant instructions):

    div {
      display: table;
      width: 250px;
      table-layout: fixed;
    }
    
    div > div {
      display: table-cell;
      width: 2%; /* or 100% according to OP comment. See edit about Safari 6 below */
    }
    

    EDIT (2013): Beware of Safari 6 on OS X, it has table-layout: fixed; wrong (or maybe just different, very different from other browsers. I didn’t proof-read CSS2.1 REC table layout 😉 ). Be prepared to different results.

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

Sidebar

Related Questions

In C#, if you want a method to have an indeterminate number of parameters,
I have a sorted array of some indeterminate number of variables and counts thereof.
I have an AutoCompleteTextView and an indeterminate progress bar in a relative layout. The
Have you ever obfuscated your code before? Are there ever legitimate reasons to do
I have the results of a test taken by a number of individuals at
I have a fairly short and indeterminate process which needs a quicker-than-standard animation speed.
I have a ToggleButton to which I'm applying the following style <Style x:Key=ToggleButtonStyle TargetType=ToggleButton>
I'm trying to use a NSProgressIndicator (indeterminate) inside of a statusbar-menu. I'm using an
Is there a way to extend the Bitmap class in Android? I have a
When loading data into my Fragments I would would like to have an indeterminate

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.