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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:34:56+00:00 2026-05-13T17:34:56+00:00

I have a table with 1 row and 5 columns. I have fixed the

  • 0

I have a table with 1 row and 5 columns. I have fixed the width of those 5 columns to certain known values (150px, 200px etc..). I have also set the left-margin for each one.

I want the table to widen and occupy the entire width of its parent. So, I set its width to 100%. When the table is wider than the combined width and margins of the 5 columns, it causes them to spread out across the table leaving gaps in between.

But, I want those 5 columns to stay on the left.

To achieve this, I added a 6th column and set its width to auto, hoping that it will properly push the first 5 to the left and occupy the remaining space. It works in Firefox and Chrome. But it doesn’t work in IE. In IE, the 5 columns still space themselves evenly across the table.

I tried setting the width of the 6th column to 100% instead of auto. But the problem is, it is wiping out the left-margins of the 5 columns! Sort of like, the 100% column is pushing the 5 columns too much to the left that their margins have disappeared!

I want the padding, margin and width of the first 5 columns to be maintained, but pushed to the left, yet the table should expand as wide as its parent.

The table has a background image that needs to show up beyond the 5 columns.

Some might suggest that I move the background to the table’s parent, but I can’t – take my word for it 😀

How can I get this to work in Firefox, Chrome and IE?

Thanks.

Here is the link : http://test.greedge.com/table/table.php. Try it in FF and IE

  • 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-13T17:34:56+00:00Added an answer on May 13, 2026 at 5:34 pm

    Edit: The solution is simple: Add a   to the one td in the table in the last column.
    The table cell of the inlying table is not rendered, because it contains nothing. Thus, the last cell also contains nothing, does not get rendered, and the other cells have to split the available space amongst them.

    I don’t know which browser is doing the right thing here, all IE’s (including 8) don’t render the column, all other browsers do.

    Old answer:

    Columns aren’t supposed to have margins according to the CSS 2.1 spec:

    margin-right, margin-left

    Applies to: all elements except elements with table display types other than table-caption, table and inline-table

    You will need to use padding within the cells.

    An auto column should work in any browser in the scenario you describe (just don’t specify any width). Can you post an online example of a table that doesn’t work?

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

Sidebar

Related Questions

I have a 5 million row table that gets hit with a specific query
I have a table with multiple rows. Each row is a form. I want
I have a table style page with rows. Each row has a checkbox. I
I have a table structure that looks like: <table> <tr id=row1> <td> <div>row 1
In my iPhone application I have a table view. When user taps any row,
I have a MySQL table that will only have one row. What should my
I have a databases table with ~50K rows in it, each row represents a
I have a query to insert a row into a table, which has a
I have a million rows in a database table. For each row I have
I'll simplify the problem as much as possible: I have an oracle table: row_priority,

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.