开发者

Table width overshoots container div

开发者 https://www.devze.com 2023-03-18 02:22 出处:网络
I have a div with: position: absolute; margin: 0px; left: 0px; right: 0px; top: 58px; bottom: 0px; height: 439px;

I have a div with:

position: absolute;
margin: 0px;
left: 0px;
right: 0px;
top: 58px;
bottom: 0px;
height: 439px;
width: 880px;
z-index: 1;
visibility: visible;
display: block;

It contains a div and a table. The table tag had width=100%, cellspacing=0 and cellpadding=0.

When I see this in Firefox with Firebug I can see that the table goes beyond the div boundaries. How do I make the table width exactly 100% of the div. In another question asked on this site i saw that the border-collapse:collapse; in the CSS could cause this behavi开发者_JAVA百科our. Hence I have removed that with no effect!

Any help would be appreciated! Thanks


In the fiddle below I modified width to 500px to see the whole div and Chrome/FF debugger shows no problem at all.

fiddle: http://jsfiddle.net/fzqH5/2/

0

精彩评论

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

关注公众号