Alex Rivera | Logout

How do I specify in HTML or CSS the absolute minimum width of a table cell

Asked 2008-09-11T14:21:32.177
51

Summary

What's the best way to ensure a table cell cannot be less than a certain minimum width.

Example

I want to ensure that all cells in a table are at least 100px wide regards of the width of the tables container. If there is more available space the table cells should fill that space.

Browser compatibility

I possible I would like to find a solution that works in

  • IE 6-8
  • FF 2-3
  • Safari

In order of preference.

Edit
Report

1 Answer

4

I had some success with:

    min-width: 193px;
    width:auto !important; 
    _width: 193px;  /* IE6 hack */

Based on a combination of Vatos' response and a min-height article here: http://www.dustindiaz.com/min-height-fast-hack/

answered 2009-06-17T15:59:11.360

Your Answer