Hi,
This is actually two questions in one: how to have a block just fit the
data it contains (see my "table-cell" kludge) and how to have it centered
in a larger block?
My idea is to have my page split into two columns (each half as wide as the
whole page, this is the "bigblock" class), and to have in each of these
columns one, typically narrow, column (this is the "fitblock" class),
horizontally centered within its "bigblock" parent.
Unfortunately, http://yo.dan.free.fr/test.html doesn't work: the green box
is not centered inside its red block. Only <CENTER> is "powerful enough" to
get what I want: http://yo.dan.free.fr/test2.html. I would like to get rid
of this <CENTER> tag.
http://yo.dan.free.fr/test3.html shows that if I don't use
..fitblock { display: table-cell; }
"fitblock" expands and fills its containing "bigblock", nullifying any
attempt to center its content in the left half of the page.
Any solution to this problem? Is it possible to get rid of the "bigblocks"
and to correctly position my data (<ul>...</ul>) in the middle of the left
half of the page?
Cheers,
--
Daniel Déchelotte
http://yo.dan.free.fr/