• (first, I know about child themes, please do not tell me to make child themes and then not answer my query)

    I would like to write CSS for my background image instead of using the background image selector via the admin panel. I’ve searched Google for a way to deactivate this function and haven’t found a good answer. Anyone know how to deactivate the Theme’s Background Image Selector and write CSS instead?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator cubecolour

    (@numeeja)

    you can just ignore the background image selector & set the background using css as you normally would.

    for example:

    body {
    	background: #E7CA30 url(images/bg.png) repeat fixed;
    }

    Thread Starter ricketts8

    (@ricketts8)

    Nope.

    Moderator cubecolour

    (@numeeja)

    What do you mean by ‘nope’?

    Thread Starter ricketts8

    (@ricketts8)

    Sorry, just frustrated. No, the code you suggested didn’t do anything. I’ve tried several different variations in CSS to get it to show and nothing’s happening. Yet when I go in through the admin panel it changes right away.

    the cause is that the ‘background function’ embeddes the styles into the head area, which gives it precedence over styles in style.css.

    you can force the body background in the style.css to rule by adding !important; for instance:

    body {
    	background: #E7CA30 url(images/bg.png) repeat fixed!important;
    }
    Moderator cubecolour

    (@numeeja)

    If there is no image specified within the background image selector, it doesn’t put anything into the head area. I copied & pasted that css example directly from a twentyten child theme I’m running on a site.

    Thread Starter ricketts8

    (@ricketts8)

    Okay, so both options seem to work. Thanks.

    Here’s a follow-up

    htmlgiant.com

    It seems, looking through Firebug, this site has two background images. I’ve replicated the code in my stylesheet (twenty-ten) but it isn’t exactly working.

    Any idea how to replicate that? I’m experimenting as we speak but I can’t get it to go.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Twenty-Ten Background Image Using CSS’ is closed to new replies.