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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:51:53+00:00 2026-06-10T23:51:53+00:00

I have the following code, for instance: JSFiddle: http://jsfiddle.net/ntcg3/4/ HTML: <html> <p class=hey>hi</p> </html>​​​​​​​​​​​

  • 0

I have the following code, for instance:

JSFiddle: http://jsfiddle.net/ntcg3/4/

HTML:

<html>
    <p class="hey">hi</p>
</html>​​​​​​​​​​​

CSS:

.hey {
    width:100%;
    background-color:red;
    margin:0;
    padding:0;
}

​

There is still a bit of padding on the right side of the page.

How can I get rid of that padding so the red background color extends to the very end of the page?

  • 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-10T23:51:55+00:00Added an answer on June 10, 2026 at 11:51 pm

    When you create an HTML page by default the <body> and some other elements like paragraph tags (<p>), heading tags (<h1>, <h2> .. <h6>) etc… has default padding and margins

    So you need to clear those margin by adding following css:

    html, body, p, h1, h2, h3, h4, h5, h6 {
        margin:0;
        padding:0;
    }
    

    For further details see CSS RESET

    The goal of a reset stylesheet is to reduce browser inconsistencies in things like default line heights, margins and font sizes of headings, and so on.

    An example of a CSS Reset:

    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, 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,
    article, aside, canvas, details, embed, 
    figure, figcaption, footer, header, hgroup, 
    menu, nav, output, ruby, section, summary,
    time, mark, audio, video {
        margin: 0;
        padding: 0;
        border: 0;
        font-size: 100%;
        font: inherit;
        vertical-align: baseline;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code public static class StaticClass { public static Instance Inst
I have the following code (ObjA) and it works as I would expect, instance
I have the following code in config: <?php return array( 'di' => array( 'instance'
I have following code that I am compiling in a .NET 4.0 project namespace
I have the following code that is able to create a class that has
I have the following code to start my own Cocoa HTTP Server . In
I have the following code: jobsToShiftUp.AddRange(PresentationManager.Instance.ScheduleViewSource.Where(o => o.Resources.First().ResourceName == criticalJob.Resources.First().ResourceName && ((o.Start >= criticalJob.Start)
I have the following code which uses the System.Timers.Timer: // an instance variable Timer
I have the following code: class ServletSpec extends Specification { def createServlet[T <: HttpServlet](clazz:
Lets say we have the following code: class C t where g :: t

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.