The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Changes to Body in CSS have no effect on site all of a sudden

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #38793

    So I was working on adding a few divs to my header tonight and was testing out the look. I didn’t like it, removed what I added and all of a sudden my Body element isn’t working. Here’s my code:

    body {
    margin:0 auto;
    background: pink;
    box-shadow: 0 0 3px #000;

    As you can see, I’ve set the background to PINK and when you go to the site, the background is WHITE. No matter what I change in my CSS style sheet for the body, nothing about the BODY changes. Anything else I change in CSS, has an immediate affect. It’s 2:21am so you can imagine how frustrated I am right now. I’ve been looking over everything all night and even pasted my css into Dreamweaver to check for mistakes. It makes no sense and I’m about to go insane.

    My site is at

    You can see there is some space at the top of the site. This is because it’s not seeing the margin: 0 in the Body. The box-shadow also disappeared. I’m running this site on Expression Engine. I’m hoping this has happened to someone else before.




    Create a pen at Provide us with some more code and I am sure we can help you.


    Here’s my codepen:

    pretty slick that codepen! It doesn’t look like my body is working there either. No pink background!

    : that doesn’t explain why it’s completely negating my Body element.


    So it works now and I don’t know why. There must have been some weird character corrupting my css. I deleted the body block and simplified it to a background color locally in Dreamweaver. It worked. Pasted it on the site and fixed it. I swear there must really be gremlins.


    The ; at the beginning of ;@charset “utf-8”; seems to be causing the problem.

    I don’t know anything about Expression Engine, though; is there a reason you’ve placed a semicolon before the @charset rule?

    Edit: Guess I was a bit late. =P Glad to hear you’ve fixed it though.


    You know what? That was probably it! Well it’s nice to know that no matter what this would have been fixed in the am. You guys are great!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.