You are here: Re: Text field text alignment « HTML « IT news, forums, messages
Re: Text field text alignment

Posted by Jonathan N. Little on 12/14/06 22:05

Jukka K. Korpela wrote:
> Scripsit Jonathan N. Little:
>
>>> PS: is it possible to align at the decimal point?
>>>
>>
>> Not on INPUT elements, on table cells but I believe browser support it
>> spotty
>
> By the CSS 2.0 specification, you can use text-align: ".", and you could
> even use the display property to turn input elements into cells in CSS
> sense (i.e., as elements to be rendered as table cells). But string
> values for text-align haven't been implemented at all, and the drafts
> for CSS 2.1 (work in progress) have this feature removed.
>
> For table cells, there are somewhat contrived techniques to create the
> impression of aligning at the decimal point, and they work part of the
> time. I guess it would be possible to do something similar with input
> elements, using JavaScript to insert special space characters as needed,
> but it would not work reliably at all in any open environment.
>
I thought I had seen it somewhere but could not find it. Moot though,
because I haven't a browser that supports it.

For OP your best solution is to style for right alignment and make sure
your font is monospace "fix-width" and has a consistent number of
decimal digits.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

 

Navigation:

[Reply to this 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

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