[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Mysterious extra padding below canvas



When I have other elements on a page together with a canvas, in order to compute an ideal canvas size, I need to query, or compute, things like the margin, border and padding heights of elements, particularly the body element. I have not so far found any way through the DOM to obtain this information.  The queries I've found return (content area + padding) or (content area + padding + border). I have found no query whose result is influenced by the margin nor any to tell me the padding.

Style queries return empty strings unless a style is actually set on the element so are useless for elements having default settings.

Can anyone suggest a way to determine this information?

Regards

-Mark


begin:vcard
fn:Mark Callow
n:Callow;Mark
org:HI Corporation;Graphics Lab, Research & Development
adr:Higashiyama 1-4-4, Meguro-ku;;Meguro Higashiyama Bldg 5F;Tokyo;;153-0043;Japan
email;internet:callow_mark@hicorp.co.jp
title:Chief Architect
tel;work:+81 3 3710 9367 x228
tel;fax:+81 3 5773 8660
x-mozilla-html:TRUE
url:http://www.hicorp.co.jp,  http://www.mascotcapsule.com
version:2.1
end:vcard