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

Re: [Public WebGL] Mysterious extra padding below canvas

Even with this change, when I have {width,height} = 100% in the canvas style, I get a big white space below the canvas in FF4 beta 7. Also the space normally occupied by the "Add-on Bar" is not used when the add-on bar is not displayed so the white space becomes even larger. Check out the attached example. This file has the lines to set the actual canvas size commented out in order to avoid the bug I described in the message. "css size vs. canvas size". It looks like another FF bug.



On 12/11/2010 04:43, Gregg Tavares (wrk) wrote:
Ok, my bad. I was going with what's worked in the past.

The issue is that <canvas> is by default an inline element.  Inline elements have a baseline.

To fix the issue change the style of the canvas to a block

canvas {
  display: block;
fn:Mark Callow
org:HI Corporation;Graphics Lab, Research & Development
adr:Higashiyama 1-4-4, Meguro-ku;;Meguro Higashiyama Bldg 5F;Tokyo;;153-0043;Japan
title:Chief Architect
tel;work:+81 3 3710 9367 x228
tel;fax:+81 3 5773 8660
url:http://www.hicorp.co.jp,  http://www.mascotcapsule.com