How to use CSS to change background color dark green

  • Unknown's avatar

    Hello,

    I just created a very basic wordpress blog and I know very, very little about CSS. My CSS stylesheet editor is completely blank. Is there some code that I can put in that box to make the background (as in the borders of the page) dark green?

    I have tried putting in the following code, but is has not seemed to work thus far:

    <html>
    <head>
    <style type=”text/css”>
    body
    {
    background-color:#254117;
    }

    In fact, for some reason this turns my border sky blue, no matter what number I put after the # sign. Can anyone help?

    Thank you so much!

  • Unknown's avatar

    You did not specify a blog address or reason for posting when you created this topic.

    This support forum is for blogs hosted at WordPress.com. If your question is about a self-hosted WordPress blog then you’ll find help at the WordPress.org forums.

    If you don’t understand the difference between WordPress.com and WordPress.org, you may find this information helpful.

    If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.

    This is an automated message.

  • Unknown's avatar

    What you want to do is to change the color for the actual background using the code that is aready in the CSS otherwise your code and the existing code will be in conflict.

    body {
    background:none repeat scroll 0 0 #254117;
    }
  • Unknown's avatar

    Thank you for your quick response! Unfortunately there is no code in the CSS box that I’m looking at. I haven’t yet got the CSS Custom Upgrade, where you can save changes, for now I’m using the CSS Style Sheet Editor Preview. Can I still change the background, even though the CSS does not have any code in it now?

  • Unknown's avatar

    If all you want to do is change the background color, you can do that without the CSS upgrade. Go to appearance > background and in the background color field, put the hex color code in there (without the leading #).

  • Unknown's avatar

    Wow, I feel so silly. Thanks so much for that! I really would have spent hours and hours looking up codes. I appreciate your help.

  • Unknown's avatar

    You can do it either place. If the CSS code I put above was pasted into the CSS edit box, then the color would have changed to green although to see it you might have had to refresh the “preview” page as it has been flakey lately.

  • The topic ‘How to use CSS to change background color dark green’ is closed to new replies.