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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:29:22+00:00 2026-05-31T06:29:22+00:00

I am making a container called fullWidthContainer to put all my articles and crap

  • 0

I am making a container called “fullWidthContainer” to put all my articles and crap in it.
It needs to be spaced from the top header and the bottom footer so I have gave it a margin of 40px on top and on bottom.

HTML code:

<div id="fullWidthContainer class="cAlign">
...
</div>

CSS:

div#fullWidthContainer
{
margin: 40px 0 40px 0;
}


.cAlign { width: 960px; margin: 0 auto; }

This is causing all the contents inside to not be aligned in the center. Everything is jacked and aligned to the left.

If I type the above CSS code in this manner….:

div#fullWidthContainer
{
    margin-top: 40px;
    margin-bottom: 40px;
}

.cAlign { width: 960px; margin: 0, auto; }

then it works fine. Why is this? Doesn’t it mean the same thing? I feel like this is something very easy that I missed….

  • 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-31T06:29:24+00:00Added an answer on May 31, 2026 at 6:29 am

    I think it’s because your margin-left and margin-right are not 0 to begin with. In the first code, you set them to 0px. In the second one, you don’t touch them.

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

Sidebar

Related Questions

I'm making a script that goes through a table that contains all the other
I'm making a lightbox plugin called WowBox. Right now, if you want to make
I'm making a LIST container with my own item renderer to display xml file.
I am making a method so your password needs at least one captial and
I'm making a flash tower defense game. I have a clip called towers. In
I'm making an application that contains button's and those buttons control an embedded browser.
I am making an app which contains fragments within tabs.In this whenever I try
So, I'm making my first Android application, which basically contains ~250 .txt files in
Making an adobe flex ui in which data that is calculated must use proprietary
Making my first steps in RIA Services (VS2010Beta2) and i encountered this problem: created

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.