• Resolved madgeystardust

    (@madgeystardust)


    I’m using the Twenty Eleven theme with a child theme and would like to set the article element to have a background colour of white, but when I do this it ruins the rest of the site, as every page has the article div on it and so where I have elements in front of a colourful background pic, when I make the article div background colour white, it seems to muck everything up…

    Take a look and see, my site is https://www.artescape.org.uk

    Any help or advice provided would be much appreciated.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You should be able to target your CSS using the classes generated by body_class() or post_class(). Try using Firefox with the Firebug add-on to identify a suitable class or ID that you can use.
    https://getfirebug.com/

    Thread Starter madgeystardust

    (@madgeystardust)

    I have been using Firebug, but didn’t even notice the class name applied to the body on the posts (noticeboard) page!

    Can I get a hint on the syntax please? You’d be doing me a huge favour!

    Thanks for taking the time to help. :o)

    Thread Starter madgeystardust

    (@madgeystardust)

    Worked it out!
    Firebug displayed the name of the class within the HTML console window as

    <body class=”blog single-author one-column content”>

    but along the top of the firebug bar it displayed as body.blog, so have updated my css with:

    body.blog article {
    background-color: #FFFFFF;
    }

    This worked!

    Thanks again for the help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can you customise a specific element on a specific page?’ is closed to new replies.