du****@gmail.com wrote :
Hi,
I'm trying to do align table center in CSS like this. But it doesn't
work.
.tx-gooffotoboek-pi1 table {
text-align: center;
}
I can do <table align="center"but it's said deprecated. Hence the
how to center table question.
Thanks in advance for any help.
Bing
Using Web Standards in your Web Pages
Section 2.2.3.2 I use <centeror align="center". How to align with CSS?
http://developer.mozilla.org/en/docs...your_Web_Pages
The CSS1 text-align property specifies how text or inline elements (like
an image) are aligned within an element.
CSS "margin-left: auto; margin-right: auto;" properties will center a
block-level element within its containing block. Defining margin-left
and margin-right is for block-level elements. When both margin-left and
margin-right are auto, they are set to equal values, thus centering a
block-level element within its parent.
References:
CSS1 horizontal formating
http://www.w3.org/TR/REC-CSS1#horizontal-formatting
Worth mentioning is the excellent tutorial:
Centring using CSS by D. Dorward
http://dorward.me.uk/www/centre/
Also Interactive demo on CSS horizontal alignment and horizontal formating
http://www.gtalbot.org/NvuSection/Nv...Alignment.html
Gérard
--
Using Web Standards in your Web Pages (Updated Dec. 2006)
http://developer.mozilla.org/en/docs...your_Web_Pages