Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7906445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:58:33+00:00 2026-06-03T10:58:33+00:00

I made a game that sets the width and height of the canvas as

  • 0

I made a game that sets the width and height of the canvas as window.innerWidth and window.innerHeight, respectively. In theory, this should make it flush with the sides, yet I get scrollbars and a 4 pixel height blank to the bottom of the page. I set the margins and paddings to * as 0, thinking that would solve it, yet it’s still like that.

I need to use the least amount of code as possible; this is for a future js1k compo.

Here’s a screenie of the page Top-Left Scrolled Image, Bottom-Right Scrolled Image.

Any ideas on what is wrong or on how to fix it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T10:58:34+00:00Added an answer on June 3, 2026 at 10:58 am

    You’re missing a display: block for your canvas element, or a <!DOCTYPE html> – they’re inline by default unless you’re in html5 mode.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to make a game object that can be made semitransparent during
This is a code to play a guessing game that i made, but the
I've made a small game that uses level, and level is just a int
I'm creating a Tic tac toe game, in that after click made by user
I have a little game that I made (a runnable jar) and would like
I am working on a small game that uses a 2D map (made up
So I've been trying to code a tabletop game that I made a long
My question involves a simple game that 2-4 people can play. This is a
I made an HTML5 game that consists of many small levels. When the player
I made a game in VB .Net that uses tcp and sends messages back

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.