CSS background-color change? - Post...

User 2495153 Photo


Registered User
14 posts

Hi, I'm working with HTML5 and CSS3.

I entered body { 'background-color: # eeeeee; } in my stylesheet but it has no effect on the previous color. Earlier when I tried changing the color to a lightseagreen # 20b2aa it worked but now I cannot change it back to my original light gray color. I've saved everything twice over without effecting a change of color. OK I realize I should be using the website wizard but I'm still trying to learn coding so that I can develop a site without Dreamweaver or templates.
Bill Watters
User 1948478 Photo


Senior Advisor
1,850 posts

Some possible culprits:

- You have an extraneous single-quote mark before "background..."
- You have a space after the #-sign
- If you have more than one body statement, the last one encountered by the browser will govern.
- Clear your cache

Those are all I can think of at the moment, not having access to the URL or the complete files...
User 122279 Photo


Senior Advisor
14,624 posts

Per is right. Just tidy your css code (and possibly clear your cache), that'll do the trick.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 38401 Photo


Senior Advisor
10,951 posts

got a link? In case the above doesn't fix it for you, the best way to help is for us to see it :)
User 2073552 Photo


Registered User
1,625 posts

Bill,

CSS Does NOT like spaces. :P I would do as Jo Ann suggested and place a link in your posts when asking a question. It allows us to look at your code and help find the problem instead of you telling us what you think it is. (That sounds rude but please do not take it that way, I just put it as simply as I could.) But normally it is just a small error in the code that is causing this, or it could be a overlapping code. :D
"An Apple doth not fall far from its tree, yet an orange does."

https://lbwebsitedesign.com - Responsive Web Design & Web Hosting Services.
http://helpsite.sirage.com - HTML5, CSS3 and CC Help Video Blog.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.