NetTalk Central

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - seancameron

Pages: 1 [2]
16
Web Server - Ask For Help / Re: Center a browse on a web page
« on: September 20, 2007, 01:57:33 AM »
The align attribute is deprecated in the current HTML 4.01 and XHTML 1.0 specifications and hence it is recommend that you don't use this attribute. You should use CSS to do the formatting:

<table style="width: 50%; margin-left: auto; margin-right: auto;">
</table>

Specifying the width of the table in either pixels or percentage is optional, and the table will expand if the contents are large than the size specified anyway.

For block elements you can use the text-align CSS attribute:
<div style="text-align: center;">
</div>

Even better you could move these to the CSS file:

.center { margin-left: auto; margin-right: auto;}

and then in the code:

<table class="center">
</table>

<div class="center">
</div>


Regards,

Sean Cameron
Capesoft
www.capesoft.com

Pages: 1 [2]