开发者

Expand width of final cell in a div table?

I'm working on constructing a table using only divs. I began creating the table using percentages 开发者_Python百科to set column widths, but would prefer to just use table-cell and not have to worry about things that way. Only problem is I'm not guaranteed to have the same number of elements in every row.

http://jsfiddle.net/JWvLX/

This example shows what is currently happening in the top two rows, and what I want to happen if a cell is removed/not present in the bottom two rows.

What exactly do I need to do to accomplish this? Is this possible using only divs for tables or will I be forced to use actual tables to get the desired effect.


There's no equivalent for colspan/rowspan in CSS tables, but this Sitepoint post has some trickery you might be able to use.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜