WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Altering backgrounds in twenty eleven theme (6 posts)

  1. hamishtodd1
    Member
    Posted 1 year ago #

    Hey. Here's my site http://www.musicofthespheresgame.com

    What I'm trying to do is make it so that the different pages (accessible along the top bar) have different backgrounds.

    Google has taken me to numerous tutorials that look at this. Most of them are to do with editing body.page-id-9 in style.css. That doesn't seem to be possible at all though, because in the 2011 theme, the background isn't set there. It appears to be set in a place that you only have access to with the "appearance->background" functionality. I've tried putting a lot of stuff in style.css, and it never works, even when I tell "appearance->background" that I don't want it to show a background.

    Is there anything else I can do? Or is there something I'm missing?

  2. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

  3. hamishtodd1
    Member
    Posted 1 year ago #

    I have *always* had "<body <?php body_class(); ?>>" written in header.php.

    One thing that I'll say I've just discovered is that going to the source of the webpages, that phrase does NOT appear. The body tag has a load of different stuff in it. But I can't find that part of the source anywhere in my code.

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    Are you familiar with CSS?

  5. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    the custom option in dashboard - appearance - background is writing (embedding) the styles into the head section, therefore it is more specific, and you might need to use !important with your page specific body background styles.

    or instead of !important try styling:
    body.custom-background.page-id-9 { .. }

    additionally, your background image url /wp-admin/uploads/2012/08/random-patterns.png is not found - possibly needs to be /wp-content/uploads/...

    this might work:
    background-image: url('http://www.musicofthespheresgame.com/wp-content/uploads/2012/08/random-patterns.png')!important;

  6. hamishtodd1
    Member
    Posted 1 year ago #

    Dude, I owe you many, many drinks. A combination of the second and third solutions sorted me out fine - I didn't have to use !important.

    What ever they pay you guys, it isn't enough.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.