Use the dimensions plugin:
http://dev.jquery.com/browser/trunk/plugins/dimensions?rev=1798

On May 18, 5:18 pm, Gordon <[EMAIL PROTECTED]> wrote:
> I'm having a little trouble with the width function of jQuery and IE,
> I suspect that what I've run into is an IE bug rather than a jQuery
> one, but it's annoying nonetheless and I'd like some advice for a
> fix.
>
> My problem is that I need to create an effect where elements inside a
> containing element move to new positions.  This means the contained
> elements have to be set position: absolute for the duration of the
> effect.  Of course, doing this to every element inside a container
> causes the container to collapse, so I do the following before
> starting to change the properties of the contained elements:
>
> $('#container').css ({
>         width:  $('#container').width (),
>         height: $('#container').height ()
>
> });
>
> This works great in all test browsers, except, of course for IE.  In
> all versions I have (5.5 - 7) this approach also works, unless the
> contained elements have a border other than 0.  Then the computed size
> seems to be smaller than the required value by ((border width left +
> border width right) * 2)
>
> Is there a way around this problem?  I'm using XHTML 1.1 as my doctype

Reply via email to