Title: CSS background image
Last modified: August 19, 2016

---

# CSS background image

 *  [pattonyu](https://wordpress.org/support/users/pattonyu/)
 * (@pattonyu)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/css-background-image-1/)
 * I have image in background:
    [http://www.rikovmlin.net](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)

 *  [adamrice](https://wordpress.org/support/users/adamrice/)
 * (@adamrice)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/css-background-image-1/#post-805553)
 * 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.

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [image positioning](https://wordpress.org/support/topic-tag/image-positioning/)
 * [positioning](https://wordpress.org/support/topic-tag/positioning/)

 * 1 reply
 * 2 participants
 * Last reply from: [adamrice](https://wordpress.org/support/users/adamrice/)
 * Last activity: [17 years, 10 months ago](https://wordpress.org/support/topic/css-background-image-1/#post-805553)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
