Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 1.50 average.
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-09-2005, 11:31 AM   PM User | #1
amir
Regular Coder

 
Join Date: Mar 2005
Location: Pakistan
Posts: 207
Thanks: 0
Thanked 0 Times in 0 Posts
amir is an unknown quantity at this point
how to fix the width of table?

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.

Regards,
Aamir
__________________
God helps those who help others.
amir is offline   Reply With Quote
Old 07-09-2005, 12:20 PM   PM User | #2
jscheuer1
Regular Coder

 
Join Date: Mar 2005
Location: SE PA USA
Posts: 373
Thanks: 0
Thanked 0 Times in 0 Posts
jscheuer1 is an unknown quantity at this point
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:
Code:
<div style="overflow:hidden;width:300px">
<table>
<tr>
    <td><img src=1st.jpg></td>
</tr>
</table>
</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).
jscheuer1 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:31 AM.


Advertisement
Log in to turn off these ads.