Table column fixed width

Total Post:89

Points:629

 1871  View(s)
Ratings:
Rate this:
Hi Everyone!

I'm having problems with setting a fixed width for table columns. Have a look at jsfiddle example:

http://jsfiddle.net/Stylock/jJ6DK/

The middle column should be 300px wide, and the left column should be 80px wide, but for some reason all three columns are the same width. Anyone knows how 

to fix that?

Thanks in advance!
  1. Re: Table column fixed width

    Hi Takeshi!

    Remove this css style of your table and it should work:

    table-layout: fixed;

    When you set table-layout: fixed for you table it will take these algorithms:

    The horizontal layout only depends on the table's width and the width of the columns, not the contents of the cells
    Allows a browser to lay out the table faster than the automatic table layout
    The browser can begin to display the table once the first row has been received

  1. Re: Table column fixed width

    Hi Takesh!

    Remove table-layout: fixed from table:

    table {
        border: 1px solid #D7E4B9;
        background: #B4CDCD; 
    }

Answer

Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.