Tabled By Resizing Table
Moderator: General Moderators
-
Majoraslayer
- Forum Commoner
- Posts: 64
- Joined: Thu Jun 30, 2005 11:50 am
- Location: In Your Mind...
- Contact:
Tabled By Resizing Table
Is there a way I can keep a table from resizing when the content seems to stretch it? I'm trying to put a form field in my banner table, and my banner is set as the background to the table. So, the table has to stay the same size as the banner or it starts repeating. When I put in the form field, its properly aligned with the text but it stretches the table underneath it. The text alone doesn't stretch the table. Is there a way to set the table to where it won't stretch and always stays the same size?
As far as I know, you can't prevent a table from stretching if you put something inside it that's wider than the table width.
Would make a table that's 150x150pixels.
Would make a table that's 100x150pixels. Make sure you set the form field's size attribute to something lower than the width of the table. If you're dealing with backgrounds, it's probably best to try to make the background tile gracefully, but you can usually make it work right on most browsers by specifying size of images, nested tables, and form fields.
If it's stretching vertically, IE puts a wierd space below <form> tags, so I usually try to put the form tags outside of the table, or sometimes in between <td> tags. I know it's not valid, but it eliminates the little space in IE...
If anyone else knows a way to get rid of the spacing around a form, I'd love to hear it.
Code: Select all
<table width="e;100"e;>
<tr>
<td width="e;100"e;>
<img src="e;spacer.gif"e; width="e;150"e; height="e;150"e; />
</td>
</tr>
</table>Code: Select all
<table width="e;100"e;>
<tr>
<td width="e;100"e;>
<img src="e;spacer.gif"e; width="e;10"e; height="e;150"e; />
</td>
</tr>
</table>If it's stretching vertically, IE puts a wierd space below <form> tags, so I usually try to put the form tags outside of the table, or sometimes in between <td> tags. I know it's not valid, but it eliminates the little space in IE...
Code: Select all
<table>
<tr>
<form>
<td>
<input>
</td>
</form>
</tr>
</table>-
Majoraslayer
- Forum Commoner
- Posts: 64
- Joined: Thu Jun 30, 2005 11:50 am
- Location: In Your Mind...
- Contact:
My problem is vertical stretching. I think its in td tags already, but you can have a look at it at http://www.zorasdomain.com/index.php. You'll figure out quickly what I'm talking about.
-
Majoraslayer
- Forum Commoner
- Posts: 64
- Joined: Thu Jun 30, 2005 11:50 am
- Location: In Your Mind...
- Contact:
I did a Google search, and found the following trick you might like to know about:
An Unknown Site wrote: To prevent extra spacing below a form, it is usually sufficient to set the form element’s bottom margin to zero, e.g.
<form style="margin-bottom: 0" ...>
However, for older browsers, additional methods might be needed.