Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
August 25, 2007, 10:59 pmrate this thread
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)
Re:On Sat, 25 Aug 2007 22:59:50 -0000, firstname.lastname@example.org wrote:
There is a discussion about this here:
The fifth message in the thread may be of interest to you.
As I understand it, it's only possible to get the width of a DIV using
which case you'd probably know it already.
I've uploaded a simplified page using the method described to
Try loading the page into Firefox, Opera or Safari and then hitting
the refresh button in the browser.
As usual IE, versions less then 7 anyway, is the odd man out.