"Jason Johnston" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Roland M�sl wrote:

> > I tried it and I got with Mozilla 0.9.6
> >
> > javascript:alert(document.defaultView.getComputedStyle(document.body,
> > "").getPropertyValue("width"))
> >
> > 0px
> >
> > and this is wrong.

> It's only wrong if the <body/> element has an intrinsic width of >0px.
> This means that if everything within the <body/> is absolutely
> positioned (as I seem to remember your site doing), then <body/> has no
> intrinsic width and therefore 0px is the correct value.
>
> Try
> getComputedStyle(document.documentElement,"").getPropertyValue("width")
> instead.
>
> I just ran a test, and this correctly returns the width of the viewport
> minus the scrollbar.

It works half in 0.9.6

I use a <body onresize=br()>

When I make the window small and load a page,
the value is correct

When I resize the window to a larger size,
the value is correct

When I resize the window to a smaller size,
the larger size remains.

Also MSIE does not like this statement and shows an error.


--
Roland M�sl
http://pege.org Clear targets for a confused civilization
http://BeingFound.com Web Design starts at the search engine



Reply via email to