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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:31:08+00:00 2026-05-27T09:31:08+00:00

I was recently trying to build a HTML5 webpage (using the <!DOCTYPE html> tag)

  • 0

I was recently trying to build a HTML5 webpage (using the<!DOCTYPE html> tag)
and I made a centered page with a border radius, which with the DOC. it was fluid, but without it was fine. I was wondering, what am I doing wrong? How can include the doctype and make it work?

Here’s the code:

<html>
    <head>
        <style>
        body
        {
        background: #373;
        margin:0;
        }
        #container
        {
        background:transparent;
        padding:24;
        }
        #page
        {
        display: block;
        background:#eee;
        width: 850;
        -moz-border-radius: 5px;
        -webkit-border-radius: 5px;
        border-radius: 5px;
        margin: 0 auto;
        padding:5px;
        }
        </style>
    </head>
    <body>
        <div id="container">
            <div id="page">
                Testing 1 2 3
            </div>
        </div>
    </body>
</html>

Copy and paste into this.

  • 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-27T09:31:08+00:00Added an answer on May 27, 2026 at 9:31 am

    The problem appears to be the non-zero width and padding attributes; any non-zero width needs to have a unit specified:

    The format of a length value is an optional sign character (‘+’ or ‘-‘, with ‘+’ being the default) immediately followed by a number (with or without a decimal point) immediately followed by a unit identifier (a two-letter abbreviation). After a ‘0’ number, the unit identifier is optional.

    The following seems to work, albeit I don’t necessarily know what your desired end-result is:

    body
    {
    background: #373;
    margin:0;
    }
    #container
    {
    background-color:transparent; /* amended to 'background-color' as per @Viruzzo's comment */
    padding:24px; /* needed to add 'px' to this line */
    }
    #page
    {
    display: block;
    background-color:#eee; /* amended to 'background-color' as per @Viruzzo's comment */
    width: 850px; /* and to this one */
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
    margin: 0 auto;
    padding:5px;
    }
    

    JS Fiddle demo.

    And the ‘before’ version, with your own html/css for comparison.

    References:

    • CSS units of length, at the W3.org.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to build a common page layout with a main content div and
So I recently downloaded MySQL 5.5.17, and I'm trying to build it from source
We have a c++ application which I recently ported from Linux/gcc to build on
I've recently reinstalled OSX, and now, when trying to build a new version of
Recently, all of my Android project in Eclipse had errors trying to build the
I was recently trying to explain to a programmer why, in ASP.Net, they should
Weve recently been trying to work on an application that uses pandastream to encode
I've recently been trying to create units tests for some legacy code. I've been
I've recently being trying to teach myself how parsers (for languages/context-free grammars) work, and
I've recently been trying to port a C++ application. I believe I have all

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.