Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help for getting HTML element width info.

2 views
Skip to first unread message

Jiang He

unread,
Oct 22, 2006, 10:10:20 PM10/22/06
to dev-tec...@lists.mozilla.org
Hello, everyone,

I just joined this group, and I hope some more advanced members may
enlighten me about the following question:

Can I use the Gecko engine to get the width information of some HTML
elements (such as table,tr,td)? The element width information is not always
available in the HTML source, but when the element is displayed, the width
information is required. I think the layout engine calculates the width. Is
there a way to retrieve the width of the element from the layout engine?

Thanks,

Jiang

Martijn

unread,
Oct 23, 2006, 4:14:49 AM10/23/06
to Jiang He, dev-tec...@lists.mozilla.org
On 10/23/06, Jiang He <you...@gmail.com> wrote:
> Can I use the Gecko engine to get the width information of some HTML
> elements (such as table,tr,td)? The element width information is not always
> available in the HTML source, but when the element is displayed, the width
> information is required. I think the layout engine calculates the width. Is
> there a way to retrieve the width of the element from the layout engine?

As far as I can see, you can just use the offsetWidth property.

Regards,
Martijn

> Thanks,
>
> Jiang
> _______________________________________________
> dev-tech-layout mailing list
> dev-tec...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-layout
>

0 new messages