> From:	John Russell []
> I have a div element with text-align:center property
> if i place a paragraph inside this element,  it  is correctly centered
> if i place a table inside the element, it is not centered in Amaya
	Examples needed.

	Inheritance into tables is broken in most browsers.

	text-align does not centre tables, only the inline content of
	block elements.  (I think the text within the table cells should 
	centre within the cells, but the table itself should default align,
	which is, I think, left.)  (All bets are off if you styled the 
	table as display: inline-table.)

	To centre a table, you should use auto left and right margins.
	<CENTER> has a lot to answer for, it tends to do a mix of both
	text align and margins.

	(Note that the paragraph doesn't centre, but takes up the full
	width, as ought to show if you colour it.)

	There is, however, a problem in Amaya 5.0 NT:

	<div style="text-align: center">
	<table style="width:30em; background-color: yellow">

	fails to action the width propery, and if you use the 
	deprecated method for setting the width, the cell content is
	not centred.

	Mozilla 0.9.2 appears to work.

	IE 5.01 gets it wrong (it centres the table instead of the cell

	NS 4.75 gets it wrong (it centres the table and ignores the width;
	with the deprecated, width, attribute, it seems to make the same
	mistake as IE).

	Web TV Viewer 2.0 gets it wrong (both table and text are centred, 
	and the deprecated width attribute is needed).


Received on Monday, 16 July 2001 14:52:21 UTC