Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #527

    Is it possible to have different background colors for different pages?

    #31775

    Yes, the body class function gives each page / page type a unique class. If you look at the page source for the homepage you’ll see that the body code looks like this:

    <body id='top' class="home blog" >

    so you could use this CSS to define a specific background to the homepage:

    body.home { background: #FFFFFF; }

    For a subpage, eg the Portfolio the body class looks like this:

    <body id='top' class="page page-id-46 page-parent page-template page-template-default" >

    so you could use this code specifically for this page:

    body.page-id-46 {background: #FFFFFF; }

    or this code for pages:

    body.page {background: #FFFFFF;}

    This will get you started, just look at the page source for specific pages body class code. Let me know if you need further help.

    #31776

    Fantastico, Thanks i’ll have a play about.

    Loving this theme, its great! thanks for your help

    #31777

    Hey!

    Regards,

    James

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Background colours’ is closed to new replies.