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

  • Home
  • SEARCH
  • 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 554307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:41:45+00:00 2026-05-13T11:41:45+00:00

can someone plese clarify how to set width for an html document. i have

  • 0

can someone plese clarify how to set width for an html document.
i have set the width for my body tag and even made a wrapper div to set the width but still the page is running a few pixels wide?
what am i doing wrong?

  • 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-05-13T11:41:45+00:00Added an answer on May 13, 2026 at 11:41 am

    To follow up on what @pekka said:

    The body tag has a default margin in all browsers

    Browsers have different default styles, and this likely explains the extra margin or padding that you’re seeing. For your css to behave as you expect, it’s generally adviced to reset your css. In short, but defining certain styles across all elements, you eliminate these browser inconsistencies and can then trust that your styles will cascade as you want them too. This is why setting the margin on the HTML and BODY elements eliminates the extra space mentioned in the question.

    Eric Meyer has good thoughts on this, and his reset is the one I’ve seen most frequently used across the web. However, it should be noted that the extensive example below shouldn’t be used without though. Tweak it to fit your project’s needs

    Ex (From Eric Meyer’s Reset, link below):

    /* http://meyerweb.com/eric/tools/css/reset/ */
    /* v1.0 | 20080212 */
    
    html, body, div, span, applet, object, iframe,
    h1, h2, h3, h4, h5, h6, p, blockquote, pre,
    a, abbr, acronym, address, big, cite, code,
    del, dfn, em, font, img, ins, kbd, q, s, samp,
    small, strike, strong, sub, sup, tt, var,
    b, u, i, center,
    dl, dt, dd, ol, ul, li,
    fieldset, form, label, legend,
    table, caption, tbody, tfoot, thead, tr, th, td {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-size: 100%;
    vertical-align: baseline;
    background: transparent;
    }
    body {
    line-height: 1;
    }
    ol, ul {
    list-style: none;
    }
    blockquote, q {
    quotes: none;
    }
    blockquote:before, blockquote:after,
    q:before, q:after {
    content: '';
    content: none;
    }
    
    /* remember to define focus styles! */
    :focus {
    outline: 0;
    }
    
    /* remember to highlight inserts somehow! */
    ins {
    text-decoration: none;
    }
    del {
    text-decoration: line-through;
    }
    
    /* tables still need 'cellspacing="0"' in the markup */
    table {
    border-collapse: collapse;
    border-spacing: 0;
     }
    

    Check out these discussions for a more detailed explanation:

    http://meyerweb.com/eric/tools/css/reset/

    http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/

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

Sidebar

Related Questions

Possible Duplicate: What exactly does database normalization do? Can someone please clarify data normalization?
Can someone please help me write the following, without using dot notation: self.bounds.size.width I
Can someone please help me convert the following two lines of python to C#.
I need the internal implementation of HashTable in java code. Further can you explain
i have bunch of buttons within linear layout. But there is spaces buttons. I
What the function is of the 0x10 in regards to this LEAL instruction? Is
Let's consider python (3.x) scripts: main.py: from test.team import team from test.user import user
I'm using the Authorize() attribute to secure my controllers/actions and want to only display
Hi so this is what I understand how Openid works:- the user enters his
I am not familiar with Hashing algorithms and the risks associated when using them

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.