Jump to content

fieldset table


asmith

Recommended Posts

hey guys

i have a table in a fieldset, i want to put it in middle of the fieldset , but i can't figure how  . i tried : ( i mean verticaly middle )

 

<filedset>
<table valign="middle"> ..

 

but it won't work . i tried similar thing with CSS vertical align, that won't work too .i put table in div  , and set things for div , but that doesn't work too .

 

any idea ?

Link to comment
Share on other sites

 

create a nested table; that should do the trick - something like this:

 

<fieldset>
<table height=100% width=100% cellpadding=0 cellspacing=0 align=center valign=center>
<td height=100% width=100% align=center valign=center>
<table align=center width=500 height=350 border=1>
<td align=center valign=middle width=500 height=350>
I'm In The Middle of It All!
</td>
</table>
</td>
</table>
</fieldset>

Link to comment
Share on other sites

Two observations:

 

#1

<fieldset><table ....>
</table></fieldset>

 

will always put your table vertically in the middle of the fieldset provided you set margins and padding appropriately.

 

#2

fieldset in not meant to be something to wrap around things other than logically grouped form inputs and controls.

 

I can't tell which is causing your problem, given that you fail to provide either code or a live example which illustrates what you see as a problem.

Link to comment
Share on other sites

So I assume you are designating a fieldset for a form element and the form elements are within a table?

 

If you designate widths for the fieldset and table in css, you could specify margin:0 auto for the table:

 

Either in the head <style> tag, external css:

fieldset {width:100%}
table {width:80%;margin:0 auto}

 

or markup inline:

<fieldset style="width:100%">
<table style="width:80%; margin:0 auto">

 

Don't forget the legend tag after fieldset and the "label for=" tags in the table cells.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.