简体   繁体   中英

Table width overshoots container div

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 behaviour. 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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM