- From: Dylan Schiemann <dylans@yahoo.com>
- Date: Mon, 30 Apr 2001 10:59:46 -0700 (PDT)
- 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 UTC