Title: Accessing background image CSS
Last modified: August 31, 2016

---

# Accessing background image CSS

 *  Resolved [Konstabel](https://wordpress.org/support/users/konstabel/)
 * (@konstabel)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/accessing-background-image-css/)
 * Hey,
 * How can I manipulate background images with CSS without going through the admin
   panel?
 * Specifically I would like to set the opacity, centre it, and make it full width.
 * I had a look at `add_theme_support( 'custom-background' );` bit the documentation
   does not mention anything.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Bob Cristello](https://wordpress.org/support/users/gntmidnight/)
 * (@gntmidnight)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/accessing-background-image-css/#post-6957999)
 * In order to manipulate the CSS files you will have to locate them in your theme.
   Typically they are usually named style.css or custom.css. Many themes have a 
   custom css metabox in the theme options so you can work with CSS before moving
   it into one of your stylesheets.
 * Manipulating background images in CSS is a purely html/css functionality and 
   not specific to WordPress. Here is a good article to give you an idea of what
   you are dealing with.
 * [http://www.techrepublic.com/blog/how-do-i/how-do-i-use-css-to-manipulate-a-background-image/](http://www.techrepublic.com/blog/how-do-i/how-do-i-use-css-to-manipulate-a-background-image/)
 * Good luck with your project.
 *  Thread Starter [Konstabel](https://wordpress.org/support/users/konstabel/)
 * (@konstabel)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/accessing-background-image-css/#post-6958013)
 * Hey Bob,
 * Thanks for your reply. Programming the CSS or finding the file is not my problem.
 * I tried amending the body tag through CSS to include a picture, but it did not
   work.
 * This is the code I did try:
 *     ```
       body {
          width: 100%;
          height: 100%;
          background-image: url(../images/background.jpg);
          background-color: #EEE;
       }
       ```
   
 * Changing the colour though, does work.
 * If I activate `add_theme_support( 'custom-background' );` I can add an image 
   through the admin panel, but it does not cover the full screen.
 *  [Peter Lawrenson](https://wordpress.org/support/users/lorro/)
 * (@lorro)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/accessing-background-image-css/#post-6958132)
 * In your example css, the width and height styles refer to the body element, not
   to the background image. I think the style you are looking for is:
    background-
   size:cover which means: “Scale the background image to be as large as possible
   so that the background area is completely covered by the background image”
 *  Thread Starter [Konstabel](https://wordpress.org/support/users/konstabel/)
 * (@konstabel)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/accessing-background-image-css/#post-6958150)
 * Perfect thanks.
 * Before I was not able to scroll the page if the content was too much.
 * For reference, the final code:
 *     ```
       body {
           background-size:cover;
           background-image: url(../images/background.jpg);
       }
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Accessing background image CSS’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [Konstabel](https://wordpress.org/support/users/konstabel/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/accessing-background-image-css/#post-6958150)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
