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,


<table width="400">
		Photo to Upload: 
		<INPUT TYPE="file" NAME="photo">

Recommended Answers

All 2 Replies

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!


commented: Helpful, without the snootiness that comes on a lot of newsgroups. Which is why I am growing to like DaniWeb +1

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.