/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] expanding table cells and fieldsets?

ok Im making this webpage for a friend using php,html, and js. I ran into this really strange problem that I cant fix. I have this page where the user can upload files. It has two select boxes, a file input box, and a submit button. Theres also an html header and footer (in the header is another header and in the footer is another footer).

What I want it to look like: a fieldset with a legend surrounding the form.

Closest I can get: a fieldset with a legend surrounding the form with half of the page as whitespace inside of it.

In the top level header, I end it with a <td width=’50%’> tag. Its been working so far by keeping everything inside of it down to 50% (including the table in the sub-header). When its just the sub-header, and some simple stuff, it works fine (the sub header end with a td width 100% tag). However this is the second page that ive had “blow up”. It expands to 100% of the page for some reason. Heres the code for the upload page:

[code]
<form action=”” method=”post” enctype=”multipart/form-data”>

<table>
<tr>
<td>
<select name=’band’ id=’BandSelect’ onchange=’updateAlbums()’>
<option value=””>Select Band</option>
</select>
</td>
<td>
<select name=’album’ id=’AlbumSelect’>
<option value=””>Select Album</option>
</select>
</td>
<td>
<input type=’file’ name=’file’ id=’FileUpload’ accept=’jpg,png,gif,bmp,mp3,wav,avi’ />
</td>
</tr>
<tr>
<td colspan=’3′ align=’center’>
<input type=’submit’ name=’upload’ value=’Upload’ />
</td>
</tr>
</table>

</form>
[/code]

I took the fieldset out but basically if I put it around the table or form, it was too big. When I put it inside the form, it became this weird empty box that hovered above the table.

*edit*
now that I think about it, its like triply nested tables dont work. When I have 2 tables, the nested one follows the limits of the parent (50% in this case). However, nothing changes when I nest a 3rd, so that the 3rd table sees its in a cell of 100% width. Theres got to be a way around this right?

**edit**
actually, I dont think what I just said is the case. When I make the table’s background black, it shows that the table is the minimum size it can be. The <td> tag of the 2nd table is what expanded to 100%.

to post a comment
HTML

5 Comments(s)

Copy linkTweet thisAlerts:
@ray326Feb 01.2007 — I don't get it. If you want a fieldset with a legend then why don't you use a fieldset with a legend?
Copy linkTweet thisAlerts:
@michael879authorFeb 01.2007 — I did... I gave a pretty detailed description of the problem. I took out the fieldset to make sure that wasnt causing the problem (it wasnt). And it looked stupid when I put it in so I took it out. Also, I stripped down my code a bit.
Copy linkTweet thisAlerts:
@michael879authorFeb 01.2007 — Basically, I have a parent table at 50%. In one of its cells is another table at 100%. This table appears to be at 50% until I put a third table inside of its cells. then it suddenly jumps to 100%. I cant figure out why, and I cant figure out how to get the appearance I want (I want the whole page to be at 50%).
Copy linkTweet thisAlerts:
@michael879authorFeb 01.2007 — well thanks for all the help... o and a special thanks to ray who gave me a completely useless reply (0 replies is more likely to get read). Try reading the post before you reply.

for anyone interested, I found a fix for the problem. I put two 25% <td> tags in the first table so that they force the nested table to stay at 50%.
Copy linkTweet thisAlerts:
@ray326Feb 02.2007 — You're welcome. I'll try not to bother you in the future.
×

Success!

Help @michael879 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...