开发者

Expanding td width beyond the size of the container

I can't figure out how to expand a td width beyond the size of the container. To see what I mean, check out this jsFiddle.

Once the table fills the container width, I can't make the cells any wider. Provided I need to do it after the page has loaded, how would I go about doing this?

I don't really 开发者_如何转开发want to resize the containing div.


You can expand the size of the table (not the outer div):
http://jsfiddle.net/maniator/dkXtw/15/

$("#testTable").width($("#testTable").width()  + 100 );


The cells are not individual elements, they are always part of the table. The table just uses the size that you set on the cells as a recommendation on how to distribute the available space, when the specified widths conflict with the dimensions that you have set for the table (which in this case is limited by the surrounding element), the widths are just used to weigh the cells against each other.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜