In HTML using the combination of <form>
and <table>
. It looks like this:
<form ...> <table> <tr> <td></td> <td></td> </tr> ... <tr> <td></td> <td></td> </tr> </table> </form>
To place this form/table in the middle of the page, you can use the following CSS
:
table { margin: 0px auto; }
source:
Until everything is ok.
When adding <fieldset>
and legend
to <form>
, it is actually added to <table>
middle. Therefore, the current structure is as follows:
<form ...> <fieldset> <legend>一些描述...</legend> <table> <tr> <td></td> <td></td> </tr> ... <tr> <td></td> <td></td> </tr> </table> </fieldset> </form>
There are two situations here:
<fieldset>
's border the same size as the form/table itself? The application is as follows:
fieldset { display: inline-block; }
source:
Even though it works as expected, <table>
is still on the left.
question
Such a thing?