[resolved] Background-Size (9 posts)

  1. zand3r
    Posted 3 years ago #


    great theme!!! thnx
    but how can I use a picture as background?
    which size is needed for this?
    or can I resize the background automatically that it fits to the edges of the screen? anything like auto-resize or auto-fill?

  2. WPyogi
    Forum Moderator
    Posted 3 years ago #

    This explains how background images work -- the specifics would depend on your site and the image you want to use:


  3. zand3r
    Posted 3 years ago #


    sorry, I'm not an expert at WordPress but also tried it with the Custom CSS like this:

    .body {
      background: url(/wops/wp-content/uploads/2012/10/DSC3749.jpg) no-repeat;
      background-size: 100% auto;

    but it doesn't work.

    The preferences for the background are also available at "Design", but there it is not able to set the size of the background if it is an image which I would like to resize at fullscreen by every solution...

    What's wrong with my code?

  4. WPyogi
    Forum Moderator
    Posted 3 years ago #

    Your image path does not look right.

    Try using the "design" option, then go to the style.css file and do the size settings.

    Can you post a link to the site -- it's really hard to help with things like this without looking at it.

  5. zand3r
    Posted 3 years ago #

    The link is -> http://wolfertz-ga.de

    Hope you'll see my problem with the background image...
    It's only a piece of code, but I don't know where to place it.


    Sorry, site isn't on yet!
    So here it is in testing -> http://wolfertz-ga.de/wops/

  6. WPyogi
    Forum Moderator
    Posted 3 years ago #

    Try adding

    background-size: 100%;

    to your custom background CSS

  7. zand3r
    Posted 3 years ago #

    That is not the style.css isn't it?
    There is only one point at Theme Options > Layout > Custom CSS

    Here i tried

    background-size: 100%;

    but nothing happened.
    Does a separate stylesheet for the background exists?

    Sorry for my lack of knowledge...

  8. WPyogi
    Forum Moderator
    Posted 3 years ago #

    Sorry, I should have been more complete -- you already have these styles for your custom background -- which are in the head section of the page:

    body.custom-background {
        background-attachment: fixed;
        background-image: url("http://wolfertz-ga.de/wops/wp-content/uploads/2012/10/DSC3749_1024.bmp");
        background-position: center top;
        background-repeat: no-repeat;

    If you add the above code to it, it should do what you want.

  9. zand3r
    Posted 3 years ago #

    Yes, thanks!

    that's what I had missed -> body.custom-background
    I didn't know that I can use it this way.

    Also background-size: 100%; is missing then it would work in fullscreen!
    Thanks a lot!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic