Re: [PEPr] Comment on Database::DB_DataObject_FormBuilder_Frontend
| From: | Richard York | Date: | Fri, 12 Mar 2004 00:26:11 +0000 |
| Subject: | Re: [PEPr] Comment on Database::DB_DataObject_FormBuilder_Frontend | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-26319@lists.php.net to get a copy of this message | ||
>I *know* that. What about id you want to align a table within one of
>those TDs to the bottom/right/center/etc.
Well, if your *knew* that, then why are you asking?
I did not realize you were using nested tables.
Ha! What a headache, huh? I've done some digging on the w3c website
which says that both align="" and <center> are deprecated and should be
replaced with the text-align property. IE applies the text-align
property to nested block level elements. Opera and Firefox ignore it
when applied to nested block level elements (Bet you already knew
that -- I, OTOH, had to do some researching).
Anyhow, after some digging, the standards compliant solution for
this is to use margin: auto; on the nested element itself. And
luckily enough it works in IE 6, Opera 7 and Mozilla Firefox.
So..
<td>
<table style='margin: auto; border: 1px solid black;'>
<tr>
<td>
blah!~
</tr>
</tr>
</table>
</td>
Not very intuitive, IMO!
Happy coding!
Regards,
Richard York