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
https://forums.phpfreaks.com/topic/84852-fieldset-table/
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
https://forums.phpfreaks.com/topic/84852-fieldset-table/#findComment-433124
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
https://forums.phpfreaks.com/topic/84852-fieldset-table/#findComment-433151
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
https://forums.phpfreaks.com/topic/84852-fieldset-table/#findComment-436235
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.