0

So I am trying to do some sizing formating with my HTML code, and I did something that works but I need to make sure I didn't do anything bad that will come up and bite me later.

I essentially am creating a form to upload files and since I don't know the size of the Browse File element, I made the width of the column it's in super small. This way it would resize itself.

How bad of a thing am I doing?

Thanks ahead as always,

Sergio

<table width="400">
<tr>
	<td ALIGN="RIGHT" VALIGN="MIDDLE">
		Photo to Upload: 
	</td>	
	<td WIDTH="10" ALIGN="RIGHT" VALIGN="MIDDLE">
		<INPUT TYPE="file" NAME="photo">
	</td>	
</tr>
</table>
2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by SergioQ
1

Very bad ;-)
Some browsers may actually listen to you and not bother to expand it, so I would suggest you simply set the size of your input element instead...

<INPUT TYPE="file" NAME="photo" style="width: 50px;">

Then you won't have to worry about setting the cell width or what size the upload element will be!

Regards
Dave

Votes + Comments
Helpful, without the snootiness that comes on a lot of newsgroups. Which is why I am growing to like DaniWeb
0

Thank you for the solution. Don't have enough wokring knowledge of forms to realize that solution was possible. Obviously I should study more.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.