Hi
The following HTML shows a table with some wide content which overlaps
an outer div when the browser width is narrowed? How do I allow the
table content to push the div to the width of the table?
I want the div to normally be centered and 90% of the page width. The
table content is dynamic so I never know how wide it's going to be. I
just want to handle things more gracefully than overlaping it.
Many thanks
Andrew
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Box problem</title>
<style type="text/css">
.box
{
margin: 0 auto;
width: 90%;
border: solid 2px red;
}
</style>
</head>
<body>
<div class="box">
<table cellspacing="0" >
<tr>
<td>
verywidestuffve rywidestuffvery widestuffverywi destuffverywide stuffverywidest uffverywidestuf fverywidestuffv erywidestuffver ywidestuff
</td>
</tr>
</table>
</div>
</body>
</html>
The following HTML shows a table with some wide content which overlaps
an outer div when the browser width is narrowed? How do I allow the
table content to push the div to the width of the table?
I want the div to normally be centered and 90% of the page width. The
table content is dynamic so I never know how wide it's going to be. I
just want to handle things more gracefully than overlaping it.
Many thanks
Andrew
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Box problem</title>
<style type="text/css">
.box
{
margin: 0 auto;
width: 90%;
border: solid 2px red;
}
</style>
</head>
<body>
<div class="box">
<table cellspacing="0" >
<tr>
<td>
verywidestuffve rywidestuffvery widestuffverywi destuffverywide stuffverywidest uffverywidestuf fverywidestuffv erywidestuffver ywidestuff
</td>
</tr>
</table>
</div>
</body>
</html>
Comment