I'm trying to avoid using <table> for formatting purposes where other,
reasonable means exist. I'm stuck trying to find a way to find an
equivalent for the code below.
<table align="center">
<tr>
<td>abc</td>
</tr>
</table>
The *desired* behavior I get from code above is that it horizontally
centers an entire *block* of text at the top of the page while not
requiring that the *text within* the block be centered. More
specifically:
(1) When there is less than 1 full line worth of text within the
<td> tag, the text appears horizontally centered on the screen.
(2) When there is more than one line worth of text within the <td>
(if you add text after "abc"), all the lines of text appear justified
to the left.
It seems the desirable effect results from how tables and table cells
are sized; the browsers are sizing tables and cells such that they are
horizontally as small as possible to display the text while avoiding
wrapping when avoiding is possible. Is there a way to achieve the same
results without using a table that works with IE 6, Firefox 1.1, and
perhaps Opera 8?
Thanks,
Mark Schneider