Reply to Re: HTML table center / right justify

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация