WordPress.org

Support

Support » How-To and Troubleshooting » Background colors like example?

Background colors like example?

  • Hello, does anyone have any idea how to achieve this effect? http://jenniferegan.com If you click on a (category) at the top, the whole background color changes for each one. Im assuming these are all categories as they have sub pages and posts??

    Any help will be
    Much appreciated!

    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Michael

    @alchymyth

    Forum Moderator

    it seems, that this theme uses the page name (or page ancestor name, resp.) as a css class in the #main div; to style the background colors accordingly. all seems to be organized as pages, and child pages, etc.

    esmi

    @esmi

    Forum Moderator

    That site is using custom page templates for each of those listings along with what looks like custom CSS classes on the enclosing div to apply the background color. You could probably achieve the same effect using using individual category templates or some category conditionals to apply custom classes in a master category template.

    Thank you! I will give it a try 🙂

    I cant seem to get this to work, does anyone have actual examples of code and where I should put it?? 🙂 Just learning!

    Michael

    @alchymyth

    Forum Moderator

    it might be easier if you could explain in more detail what you have tried so far;
    maybe paste the code of your index.php(?) – or the file you were working on – into a http://wordpress.pastebin.com/ and post the link to it here.
    or post a link to your site?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Background colors like example?’ is closed to new replies.
Skip to toolbar