|
Posted by Beauregard T. Shagnasty on 05/01/07 16:17
g@thescapins.com wrote:
> I need to figure out how to center, right justified data as shown in
> the table below.
>
> http://oisurf.com/sillypix/table_ex1.jpg
Normally, prices are not 'centered', they are in fact right-justified
(or more correctly aligned on the decimal point, as your image seems to
be).
> The price columns show right justification, and then centered data.
>
> The only (work intensive) way that I can think of is to create a table
> for each cell. Each table would contain 3 columns and 1 row. The
> middle row would contain the price data and the 1st and 3rd column
> would just be spacing to "center" the price.
Bah! A complete table just for spacing?
> Any acute htmlers know a simplier or more efficient way (less work
> intensive). Maybe using CSS?
CSS: .price { padding: 0 1em; text-align: right; }
HTML: <td class="price">$123.45</td>
--
-bts
-Motorcycles defy gravity; cars just suck
Navigation:
[Reply to this message]
|