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 8974577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:42:43+00:00 2026-06-15T18:42:43+00:00

My CSS: body { margin: 0; height: 100%; } canvas { background-color: black; height:

  • 0

My CSS:

body
{
    margin: 0;
    height: 100%;
}
canvas
{
    background-color: black;
    height: 100%;
    width: 100%;
}
html
{
    height: 100%;
}

As you can see, my body is as tall/wide as the window’s available height/width respectively. My canvas has 100% height/width, and it seems like it should be the height and width of the inside of the window. But it isn’t. It’s a few pixels taller, and a scrollbar appears. Why is this? Can I make it work somehow? I don’t think the canvas has any padding or anything. This occurs in both Chrome and Firefox.

  • 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-15T18:42:44+00:00Added an answer on June 15, 2026 at 6:42 pm

    You also need:

    canvas { display: block; }
    

    since canvas is an inline element, like img.

    Inline elements get some “leading” underneath, just like the surrounding text does.

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

Sidebar

Related Questions

I have this css3 transition code: http://jsfiddle.net/uRxKg/ CSS: body, html { height: 100%; margin:
so i have my index.html and a canvas.css body{ } #canvasHIPPO{ display:block; margin:0px auto
Given this CSS body { font-size: 62.5%; font-family: Arial,sans-serif; line-height: 2em; color:#333 } .post_text
CSS code body { background-attachment: scroll; background-clip: border-box; background-color: #ececec; background-image: none; background-origin: padding-box;
This code works... $(document).ready(function(){ $('body').css('background','black'); }); but this code doesn't... $(document).ready(function(){ $('thumb_slider').css('background','black'); }); ^^^the
html, body {margin: 0px; padding: 0px;} #pageContainer{ margin: auto; padding: auto;} #contentContainer{ margin:150px; width:1100px;
I've got a layout, here's my css: body { background-color: #16193B; /* Old browsers
The body background is not displaying in firefox. here is my CSS body{ font-family:Trebuchet
I have this in my CSS file: body {style.css (line 3) background:#CDF8FF url(images/final_bg.jpg) no-repeat
I found this css body { font: 13px/1.231 arial,helvetica,clean,sans-serif; *font-size: small; *font: x-small; }

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.