Support » Themes and Templates » transparent background for pages

  • Hi everyone,

    I was wondering how to get a transparent background for pages only (so not posts)

    I changed the wrapper value but that makes everything (pages, posts, etc) transparent.

    any id or class I could change in a Twenty Ten childtheme to make this happen?

    Kind regards

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

    (@alchymyth)

    Forum Moderator

    Twenty Ten uses body_class() so every page would have a css class in the body tag of .page, while a single post would have .single, other web pages will have something else;

    http://codex.wordpress.org/Function_Reference/body_class

    example:

    .page #wrapper { background: transparent; }

    Thanks alchymyth that worked perfect!

    Another question, now I see that in my posts even the header gets a colored background. I build this childtheme with
    #wrapper: { background: transparent; }
    so I totally forgot that it covered the whole webpage.. anything I can about that?

    PS. for others asking the same (first – on top of this page) question:
    add
    .page #wrapper { background: transparent; }
    to your childtheme’s css file

    Michael

    (@alchymyth)

    Forum Moderator

    even the header gets a colored background … it covered the whole webpage

    to get a transparent header while keeping a background on the content, try to add a background to #main:

    #wrapper{background:transparent;}
    #main{background:#fff;}

    for more detailed questions, you might need to post a link to your site.
    or you could try working with a tool such as Firebug http://getfirebug.com/ to investigate the styles.

    I use “inspect element” in google chrome, which works kinda the same as firebug.

    The code you gave me worked perfect! Thanks a lot!

    EDIT:

    #main { background: #fff; }
    .page #main { background: transparent; }

    Is perfect

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘transparent background for pages’ is closed to new replies.