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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:49:57+00:00 2026-06-10T17:49:57+00:00

I am learning CSS and I am having trouble with the concept of the

  • 0

I am learning CSS and I am having trouble with the concept of the physical width and content width. Sites seem to refer to them, without ever truly explaining the difference.

I know it has to do with teh CSS box model, if anyone else could help me out that would be great.

For example if given the following in css:

div {
width: 400px;
padding-left: 20px;
padding-right: 10px;
margin: 0px 10px;
border: 2px solid pink;
}

What is encompassed into the physical width? And what in the content width?

  • 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-10T17:49:59+00:00Added an answer on June 10, 2026 at 5:49 pm
    • “Width” refers to the content area; think of it as the ‘inside’ of your box.
    • “Padding” is extra, added on outside of the content area. It can be 0.
    • “Border” is extra, outside of the padding, if any.
    • “Margin” is extra again, outside of the border, if any.

    So, if you have width 400, padding left 20, right 10, margin 20 (10 on each side), and 4 pixels of border (2 on each side), your whole box will be 400+20+10+20+4=454px

    So, if you were trying to fit that into a space that is only 400 pixels wide, you need to reduce things somewhere; you could, for example, reduce the width by 54 pixels to make the resulting total 400.


    Note that this does not apply to “Quirks Mode”, which uses a slightly different box model, as noted in Sean’s answer. This will only apply to IE without a proper doctype; it is generally desireable to avoid quirks mode.

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

Sidebar

Related Questions

I'm learning CSS and am having trouble getting my #wrapper DIV to expand to
I'm learning HTML/CSS and I'm having a little trouble finding a way to set
learning html/css here. I can't seem to understand how to tweak this drop down
I'm just getting started with learning jQuery, and I'm having a small CSS issue.
I am learning XHTML and CSS and I got into trouble. On my learning
I'm learning javascript and I'm having trouble figuring out why my script is not
Ok, so I recently started learning jQuery, but I'm having trouble with a little
Still learning CSS so pardon if this is obvious - I am building a
I have been learning css & jquery. <!DOCTYPE html> <html> <head> <style type=text/css> #box
I'm a fairly inexperienced web designer learning css/html on the fly for a company's

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.