Why Is My Table Cell Width Wrong In Chrome?
I've got a table with two rows. The first row just has three cells. The second row has two cells, with the first cell containing another table that needs to fill the whole cell. &l
Solution 1:
Two things you should do:
- On the table element, use
table-layout: fixed;
- Insert columns and give them a width
- (You could also assign width to table headers/cells of the first row)
Like this:
<tableborder="1"style="table-layout: fixed; width: 100%;"><colgroup><colstyle="width: 205px;"><colstyle="width: auto;"><!-- Use "width: auto;" to apply the remaining (unused) space --><colstyle="width: 5px"></colgroup><tr><td>1</td><td>2</td><td>3</td></tr><!-- Etc. -->
Post a Comment for "Why Is My Table Cell Width Wrong In Chrome?"