• Hi Guys,

    I have a simple questions regarding CSS.

    I want to change the background of some of the elements on my homepage, i.e. insert an image as a background or simply change the colour.

    The website in question is here – https://www.we-seed.co.uk

    I`m trying to customize the section titled ‘So What is Online Marketing’. I used the ‘inspect element’ function in chrome and came up with the following code which I placed in the custom css section of the theme:

    .page #page-content {
    background: #660033; background: rgba(255,255,255,0.94) !important;}

    However this is not working at all for me, any ideas on how to fix it? I’m also keen on knowing how to use images for the backgrounds as well, is this a simple tweak?

    Any help would be much appreciated, I’m sure its a simple fix!

    Thanks,

    Matt

Viewing 4 replies - 1 through 4 (of 4 total)
  • Does it work if you use:

    #page-content {
    background: #660033;
    background: rgba(255,255,255,0.94);
    }

    Is there a reason you’re setting two separate background colors? Only the second background color will be applied.

    To set a background image, try this code:

    #page-content {
    background-image: url( /path/to/image );
    }
    Thread Starter mattleaver

    (@mattleaver)

    Hi Stephen,

    Thanks for your help on this!

    I tried your above suggestion, however with no luck.

    I also removed the second color code so there is no conflict. The code I have now is below:

    #page-content {
    background: #660033;
    }

    Any ideas on what the issue might be?

    Thanks,

    Matt

    I don’t see this code on your site:

    #page-content {
    background: #660033;
    }

    How did you add it? Did you receive any error messages? Is your host caching your site?

    Thread Starter mattleaver

    (@mattleaver)

    Hi Stephen,

    Apologies I had a .page piece of code before the entry which I think was stopping it from working.

    I’ve amended this now and everything seems to be fine.

    Thanks a lot for your help.

    Matt

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Changing Div Element Backgrounds’ is closed to new replies.