html, body { height: 100%; margin: 0; } #wrapper { min-height: 100%; } canvas { width: 100%; height: 100%; background: #9AB1CC; } .sunAndMoon { position: absolute; top: 30px; left: 30px; width: 150px; height: 150px border: 1px solid #000000; }