Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] css not showing image with child theme


  • roclimb
    Participant

    @roclimb

    Hi,
    I created a buddy press child theme from the default theme. It activated and works fine. I changed some css and that worked to.

    I added a new div to header.php called ropeheader. I added css to it and the csss is working because it added the width and height an dolor I added but a css image I am trying to display as a background won’t work. I have the image stored int eh regular images folder in the inc folder int eh plugin where all the other default theme images are. I also tried to add a folder into the child theme and still I get no background image displayed. I am using background-image: url(../images/background-rope-header.png);

    Any ideas or help????

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

  • @mercime
    Keymaster

    @mercime

    == I added a new div to header.php called ropeheader. ==
    Where before-inside-around-after within the header.php did you add div#ropeheader and its background image?


    roclimb
    Participant

    @roclimb

    Thanks so much for replying, Ive been trying to figure this out for a 2 hrs.

    I first added it inside the header div just before the closing for header–inside the header.php. this showed no background image that I added in the css.
    So I then moved the div#ropeheader to just below/after: php do_action( ‘bp_before_container’ )
    Still no background image. The width and height I specify in css or a color will show up fine but no background image.


    @mercime
    Keymaster

    @mercime

    site uri?


    roclimb
    Participant

    @roclimb

    Im developing on a mamp localhost so the site is not live.


    @mercime
    Keymaster

    @mercime

    Hard to guess then. It might just be that the path to the background image in your stylesheet is wrong e.g. if bg img is in themefolder/images/bg.jpg and your stylesheet is in themefolder/style.css, then the reference should be something like `background-image: url(‘images/bg.jpg’);`


    roclimb
    Participant

    @roclimb

    Thanks Mercime, that was actually it. I had the url wrong…and, I didn’t realize I need an images folder in the child theme as well. I changed the url to background-image: url(‘images/background-rope-header.png’); and added an images folder to the child theme and it adds the backgrounds like it should.

    Thanks for helping with this
    have a great day
    Rob


    @mercime
    Keymaster

    @mercime

    You’re welcome. Marking this as resolved.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] css not showing image with child theme’ is closed to new replies.
Skip to toolbar