WordPress.org

Ready to get started?Download WordPress

Forums

Buttercream
backgroung image/color on pages does not work (19 posts)

  1. ceciRjas
    Member
    Posted 1 year ago #

    Hello !
    when i do my pages, the backgroung color does not work seems that it can only be changed on the cms, problem is that i don't want to change it for all content but just one page.

    I tryed to put a background color, and it looks like the content html is not in the page.. difficult to explain, the best is to see :
    http://www.leopoldineleblog.com/?page_id=39

    i'm used to do that on wordpress, and that's the first time i have a problem ... as if it wasn't possible to put background images..

    can you help ? cause i really don't see what is the source of the problem..

  2. Caroline Moore
    Member
    Theme Author

    Posted 1 year ago #

    You probably need to target the page specifically using its ID. So, if your page has an ID of 1234, you could target its background color in your child theme or custom CSS plugin like so:

    body.page-id-1234 {
      background-color: #333 !important; /* Changing to the color value you want */
      background-image: url(/path/to/your/img.png) !important;
    }

    If that's not the issue, can you explain the problem more clearly, or post the styles you're using to change the background color on that page?

    What I see on that page is a div called #apDivchou whose position is set to absolute, therefore .entry-content (the surrounding div that contains all the post content) cannot contain it, which is why the post wrapper ends abruptly underneath your content. Setting that div to position: relative will help, but might affect the other content around it depending on what you're trying to do.

  3. ceciRjas
    Member
    Posted 1 year ago #

    it is not working... my page ID is it what's written in my url ?
    http://www.leopoldineleblog.com/?page_id=39 , so "body.page_id=39" ?

    for my div, it's not the absolute position causing the problem, on my other pages, it perfectly work !

    and for my css, i left it in my html of each page (i don't know if i can put it on the child css or create an other so i left it for the moment, until each page is ok)

    so there is my html code:
    [HTML code unnecessary if you've linked the website]
    also the cs of the theme seems to mess up with the code i write, i don't know why, for padding, for font-size.. what work on dreamweaver is not working when i put it on wordpress...

  4. ceciRjas
    Member
    Posted 1 year ago #

    i don't know how to explain more specifically... i try to work with tables in % because it seems that it's the only way to have it working with mobile..

    i'm lost... and i'm sorry if it's over free support, tell me and i'll go find help somewhere else..$$$$$$$

  5. ceciRjas
    Member
    Posted 1 year ago #

    i saw that if i put my css style in the style.css it works.. but i stile have the problem with my background :/

  6. ceciRjas
    Member
    Posted 1 year ago #

    ok, is there a possibility to put one image on the bockground for computer version and one for mobile version ? on the them style.css i guess ? but how ? i'm sorry for disturbing :(

  7. ceciRjas
    Member
    Posted 1 year ago #

    the code you gave me is not recodnize as a css style .. tells that it's not correct.. i put :
    body.page_id=39 {
    background-color: #333 !important; /* Changing to the color value you want */
    background-image: url(/path/to/your/img.png) !important;
    }

  8. Andrew
    Forum Moderator
    Posted 1 year ago #

    This bit you've used;

    body.page_id=39

    Is wrong. It should be this;

    body.page-id-39

    This bit (below)

    background-image: url(/path/to/your/img.png) !important;

    Should contain the path to your image.

  9. ceciRjas
    Member
    Posted 1 year ago #

    don't read all of what i wrote it seems to work (don't know waht i did)

  10. ceciRjas
    Member
    Posted 1 year ago #

    thank you Andrew ! i'll try it that way

  11. ceciRjas
    Member
    Posted 1 year ago #

    it is not working, i don't see my image appearing :/

  12. Andrew
    Forum Moderator
    Posted 1 year ago #

    This image doesn't exist
    http://www.leopoldineleblog.com/wp-content/themes/pages-blog/ismage/fon-chou2.jpg

    Are you sure that's the correct directory or file name?

  13. ceciRjas
    Member
    Posted 1 year ago #

    i corrected it thinking that might be the problem but stile not working (with the good url)

  14. Andrew
    Forum Moderator
    Posted 1 year ago #

    I think it is working but it's just really subtle. You're talking about the background image that's applying to the <body>, right? If so, here's a comparison between it applied and not applied.

    Applied - [screenshot]
    Not applied - [screenshot]
    (ignore the toolbar)

  15. ceciRjas
    Member
    Posted 1 year ago #

    no i'm talking about the background in the body of my page.
    you are talking about the background of the entiere site.

    it is supose to look like that
    (i know it's small i don't know why)

  16. ceciRjas
    Member
    Posted 1 year ago #

    the curious thing is.. with the color it's working and it get all the background (even the color on font that you were talking about)

    so i'm wondering.. is my background behing the white part my my text ??

  17. Andrew
    Forum Moderator
    Posted 1 year ago #

    I'd focus on first clearing up your Child Theme stylesheet.
    You ought to be importing the styles over from your parent theme (see step 3).

  18. ceciRjas
    Member
    Posted 1 year ago #

    my css you mean ?

    it is good. But i don't think that when i say background people understand me.. i'm talking about the page-content, not the background of the websote, i'm talking juste about the area where is the content of that page...

  19. ceciRjas
    Member
    Posted 1 year ago #

    so i just put it back in my div... but on mobile it llok awfull.. is there a way to put a specifically image for computer and for mobile ?

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.