Support » Themes and Templates » CSS background image

  • I have image in background:
    http://www.rikovmlin.net

    background-image: url(images/pozadina.jpg);
    	background-repeat: no-repeat;
    	background-position: left 100px;
    	background-attachment: fixed;

    so, image is on the left, WP content is “center” and it looks different on every screen resolution.
    Is it possible to put background image on “center” minus 700px of horizontal (in order to ensure that the image will allways be on the left side of text, but near it?
    How to do the code?

Viewing 1 replies (of 1 total)
  • I’m guessing you’re applying that background image to the body or a div that takes up the full width of the browser window.

    Instead, what might make more sense would be to apply it to a div that wraps around everything, but has fixed width and stays centered in the window. Something like this:

    In your template file:

    <body>
    <div id="wrapper">
    …

    In your css:

    #wrapper {
    margin: 100px auto;
    background-image: url(images/pozadina.jpg);
    background-repeat: no-repeat;
    background-position: left 100px;
    background-attachment: fixed;
    }

Viewing 1 replies (of 1 total)
  • The topic ‘CSS background image’ is closed to new replies.