WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] background vs background-image (7 posts)

  1. mrcangrejero
    Member
    Posted 3 years ago #

    I created a Parent Theme following a bunch of ideas from several WordPress fans. In my host (goDaddy.com), which is configured for multisites, I created two child sites at "dumplings" and "AccesoriosCelularPR".

    As far as CSS for the "header" is concerned, both child sites' are identical, except for the background image's NAME, as follows:

    Code for "style.css":

    @import url('../parentTheme/styles/backgrounds_CSS_only.css');
    div#header
    {
    background-color: none !important;
    background-image: url(images/<image name>.png);
    background-repeat: no-repeat;
    background-position:center;
    }

    Code for "backgrounds_CSS_only.css":

    div#header
    {
    background: #00FF00;
    }

    My problem is that, although both codes are identical (except for the background image's NAME), the background image is displayed at "dumplings" BUT NOT at "AccesoriosCelularPR".

    I know you guys are busy but any guidance will be appreciated. Thanks!!!

  2. brettlewis
    Member
    Posted 3 years ago #

    your accessories cellar cite is looking for an image at this location
    http://wp-multisites.com/wp/accesorioscelularpr/wp-content/themes/AccesoriosCelularPR/images/ACPR-Logo-Inverted.png

    is that where you want it to be?

    also, I see no need to import the background image color. try to sanitize the code a little like this

    div#header {
    background: #00FF00 url(images/IMAGENAME.png) no-repeat center;
    }
  3. mrcangrejero
    Member
    Posted 3 years ago #

    Thanks for your advice. Doen't work, either. I'm beginning to think that this is a "multisites" issue. I'm looking for an answer there, too. Thanks, anyway. Advice appreciated.

  4. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    As far as CSS for the "header" is concerned, both child sites' are identical,

    not quite -

    are you sure your header image is where you think it should be?

    from the styles, the haeder image for 'AccesoriosCelularPR' should be here:

    http://wp-multisites.com/wp/accesorioscelularpr/wp-content/themes/AccesoriosCelularPR/styles/images/headerBackground.png.png

    - there is also a typo with double .png in the style of #header in /styles/header.css (notice the extra folder!):

    background-image: url(images/headerBackground.png.png);

    (the style for #header in style.css will be overwritten by the style in /styles/header.css)
    -------------------
    the other 'duplings' header image is where it is supposed to be (with the style of #header being in style.css - no extra folder inbetween):

    http://wp-multisites.com/wp/dumplings/wp-content/themes/dumplings/images/header2.png

  5. mrcangrejero
    Member
    Posted 3 years ago #

    Thanks, alchymyth, for your guidance. Hope you don't mind this follow-up question.

    Among other things, you stated above:

    (the style for #header in style.css will be overwritten by the style in /styles/header.css)

    I don't understand. I thought that the styles imported with the "@import" statement ("/styles/header.css") could be overridden by those specified after the "@import" statement. Any guidance is appreciated. Thanks!!!

  6. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    (the style for #header in style.css will be overwritten by the style in /styles/header.css)

    I don't understand. I thought that the styles imported with the "@import" statement ("/styles/header.css") could be overridden by those specified after the "@import" statement. Any guidance is appreciated. Thanks!!!

    you are right - i might have mis-interpreted the sequence of the stylesheets.

  7. mrcangrejero
    Member
    Posted 3 years ago #

    Hey, no problem alchymyth. For me, this is an educational process. The best to you and yours. Thanks!!

Topic Closed

This topic has been closed to new replies.

About this Topic