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

Re: [Public WebGL] Mysterious extra padding below canvas




On Nov 11, 2010, at 1:37 AM, Gregg Tavares (wrk) wrote:



On Thu, Nov 11, 2010 at 12:16 AM, Mark Callow <callow_mark@hicorp.co.jp> wrote:

In my efforts to size a canvas to fill the browser window, I have found the browsers are adding some mysterious padding below the canvas element. I have created the attached simple show-gap.html to illustrate the problem.  It encloses the canvas in a <div> element with a red border so you can clearly see the space. The div's height is set to 100%. All padding and margins and set to 0 as is the canvas border. The result is the same in both Chrome & Firefox 4.


You need to tell the browser to use modern HTML. Change the first line

<!doctype html>

This is the correct doctype.