Support » Fixing WordPress » Adjust background witdh to browser width

  • Hey guys… im using Background Manager to stick the background image to bottom right corner, but i ALSO need to resize the image according to the browser WIDTH (keeping the aspect ratio).

    (that way the image would be stick to bottom right and left corners, since its gonna resize. it doesnt matter the height, since the image background is white and the website background also)

    fructum.com.br
    for an example (the background doesnt resize according to width yet, so the image usually is too big and covers the text that should be over the white part)

    Can anyone help me?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Try adding this to the end of style.css:

    body.custom-background { background-size: 100% auto; }
    Phil

    (@owendevelopment)

    Only available in browsers that render CSS3, but:

    background: url(images/yourbgimage.jpg) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;

    Hope this helps! 😉

    @phil, will that work with the Background Manager sticking the BG to the bottom right?

    Phil

    (@owendevelopment)

    Oh, I see. My option was doing it manually through style.css.

    You may be able to add my code to the plugin css file but I’d need a link to your site for a chance to find out where you should put it.

    Thread Starter HawtCoffee

    (@hawtcoffee)

    It worked vtxyzzy!! Thanks so much 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Adjust background witdh to browser width’ is closed to new replies.