View Full Version : how to fix the width of table?

07-09-2005, 11:31 AM
hi all
how to fix the width of table.
i mean to say that if i set the width of table as 20% or 480px and if i enter more values then the table's right side increases.


07-09-2005, 12:20 PM
The idea is not to put more content in the table than can fit. What do you want to happen to the content that extends beyond the boundary? Anyways, the css property you would be dealing with is overflow. Tables do not respond real well to overflow. You can however, nest the table in a division:

<div style="overflow:hidden;width:300px">
<td><img src=1st.jpg></td>
</div>The above table will never appear wider than 300px. Anything in it that lies beyond its 300px x-offset will be invisible. You can use 'overflow:scroll' then a scrollbar will appear to allow viewing of the clipped material (if any).