Fitting custom background to screen?

  • Author
  • #1264332


    I am attempting to get my custom background image to fit to any screen in CSS but can’t quite figure it out.

    Any help would be greatly appreciated!

    The blog I need help with is


    Add this to your custom CSS.

    body.custom-background {
    background-size: contain;


    When I resize my window, the image conforms somewhat but now the text doesn’t. I’ll keep messing with it.


    The text isn’t technically within the “body” and “body boundaries are the edges of the browser window. All page elements (text, etc.) are within the “page” div and the children/grandchild/etc., divs, which have dimension independent (sort of) of the browser window. That means the two resize differently.

The topic ‘Fitting custom background to screen?’ is closed to new replies.