W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2001

Re: clarification needed : Computed Style Value of 'font-family'

From: Dylan Schiemann <dylans@yahoo.com>
Date: Mon, 30 Apr 2001 10:59:46 -0700 (PDT)
Message-ID: <20010430175946.28277.qmail@web13508.mail.yahoo.com>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Cc: Daniel Glazman <glazman@netscape.com>, www-dom@w3.org, www-style@w3.org

--- Bjoern Hoehrmann <derhoermi@gmx.net> wrote:
> * Dylan Schiemann wrote on www-dom@w3.org:
> >Yes, but it you specify width:100% (or any other
> >relative value), getComputedStyle returns the
> actual
> >pixel width, which is dependent on the user agent
> and
> >its settings.
> 
> <div style='width: 20cm'>
>   <div style='width: 50%'>
>     ...
>   </div>
> </div>
> 
> div_inner
>   ->getComputedStyle
>     ->getPropertyCSSValue('width')
>       ->getFloatValue(CSS_PX)
> 
> will raise INVALID_ACCESS_ERR since 10cm couldn't be
> converted to pixels
> :-)
> 
<body>
<div style='width:80%;'>
</div>
</body>

div
->getComputedStyle
->getPropertyCSSValue('width')
->getFloatValue(CSS_PX)

will return a value in pixels that is 80% of the width
of the viewport, right? So it does depend on the
rendering... What will it return without a view?


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
Received on Monday, 30 April 2001 13:59:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:48 GMT