You are here: Re: <div question, getting fixed size of contents, not just character count « HTML « IT news, forums, messages
Re: <div question, getting fixed size of contents, not just character count

Posted by Jim Moe on 08/26/07 17:45

lhjayunaz@gmail.com wrote:
> hi, is it possible in any way, to read or determine absolute pixel
> width size of contents within a <div> tag?
>
> so like <div>what is pixel wXX size of this text?</div>
>
For HTML, no.
It would have to be a client-side function since a div normally expands
to the width of its container. If it is floated, then it shrinkwraps the
text, probably. In either case it depends on the client's current setup:
the width of the viewport, the metrics of the font set.
What is your application that needs to know this information?

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)

 

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

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