Help for getting HTML element width info.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Help for getting HTML element width info.

Jiang He
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
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: Help for getting HTML element width info.

Martijn-4
On 10/23/06, Jiang He <[hidden email]> 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
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-layout
>
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout