Title: Setting background via css
Last modified: September 3, 2018

---

# Setting background via css

 *  [szecsenke](https://wordpress.org/support/users/szecsenke/)
 * (@szecsenke)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/setting-background-via-css/)
 * Hello!
 * I would like to put a specific image as background (into the area i tried to 
   highlight with a red circle), no repeat, no scrolling, fixed fullscreen
 * > [View post on imgur.com](https://imgur.com/MxZsRMt)
 * for just this one page (Galéria) and it shouldnt appear on the others, is that
   possible?
 * if not, then can you help me putting the background in place of the grey area?
 * Also i cant seem to change the color of those two black blocks near the navmenu.
 * Can someone please help me with any of these issues?
    Thanks in advance!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsetting-background-via-css%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [7 years, 8 months ago](https://wordpress.org/support/topic/setting-background-via-css/#post-10652753)
 * That page has a class of “page-id-8”, so
 *     ```
       .page-id-8 .mainwrap {
          background: url('URL of your background image here');
       }
       ```
   
 * for the blocks:
 *     ```
       .pagenav {
           background: insertcolorcode here;
         }
       ```
   
 * **To add CSS:** use the “Additional CSS” option in the customizer. _[https://codex.wordpress.org/CSS#Custom\_CSS\_in\_WordPress](https://codex.wordpress.org/CSS#Custom_CSS_in_WordPress)_
 * Learn to use the [Chrome Developer Tools](https://developers.google.com/web/tools/chrome-devtools/)
   to help you see and test changes to your CSS.
 *  [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/setting-background-via-css/#post-10652770)
 * Using this rule, it would look like this
 *     ```
       .page-id-8 .postcontent {
           background-attachment: fixed;
           background-image: linear-gradient(tan, aliceblue);
           background-repeat: no-repeat;
       }
       ```
   
 * ![](https://i0.wp.com/s33.postimg.cc/5e8k6l4nj/Gal_ria-1625.jpg?w=500&ssl=1)
 * If you move it to `main`, it looks like this
 *     ```
       .page-id-8 .main {
           background-attachment: fixed;
           background-image: linear-gradient(tan, aliceblue);
           background-repeat: no-repeat;
       }
       ```
   
 * ![](https://i0.wp.com/s33.postimg.cc/yte8fsjjj/Gal_ria-2033.jpg?w=500&ssl=1)
 *  Thread Starter [szecsenke](https://wordpress.org/support/users/szecsenke/)
 * (@szecsenke)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/setting-background-via-css/#post-10652771)
 * Thanks a lot for the solution to the black blocks
 * However the page background doesnt seem to work, can you help with that ?
 * Thanks in advance!
 * EDIT: It works with the color code, but not with the image, i’m trying to use
   an image from the media library, could that be the problem ?
    -  This reply was modified 7 years, 8 months ago by [szecsenke](https://wordpress.org/support/users/szecsenke/).
 *  Thread Starter [szecsenke](https://wordpress.org/support/users/szecsenke/)
 * (@szecsenke)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/setting-background-via-css/#post-10652812)
 * Ok nevermind, solved it, thank you all youre wonderful!
 *  Thread Starter [szecsenke](https://wordpress.org/support/users/szecsenke/)
 * (@szecsenke)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/setting-background-via-css/#post-10653007)
 * My friend wants me to to set a background via css, to make the site look like
   this :
 * > [View post on imgur.com](https://imgur.com/YXMQbeL)
 * I have absolutely zero idea how to achieve this, as this image should cover the
   white header area (except the logo), the f4f4f4 background and the white blocks
   on the edges of the navmenu i just got fixed with the help of the support.
 * Is there a solution to this?
 * Thanks in advance!
 *  Thread Starter [szecsenke](https://wordpress.org/support/users/szecsenke/)
 * (@szecsenke)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/setting-background-via-css/#post-10654252)
 * I managed to set a background image, but (as expected) the site looks even more
   broken than it used to.
 * Is there a solution to have this image cover the #fff & #f4f4f4 blocks, and not
   look broken with the header logo? (the footer doesnt matter as i’ll remove that
   anyways)
 * Thanks in advance!
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [7 years, 8 months ago](https://wordpress.org/support/topic/setting-background-via-css/#post-10655232)
 * You’re using a commercial theme/plugin and need support, so please use their 
   official support channel. We feel they are best equipped to support their products.
 * [https://premiumcoding.com/wordpress-themes/fashy-wordpress-fashion-blog-theme/](https://premiumcoding.com/wordpress-themes/fashy-wordpress-fashion-blog-theme/)
 * **Commercial products are [not supported in these forums](https://make.wordpress.org/support/handbook/forum-welcome/#do-not-post-about-commercial-products).**.
 *  Thread Starter [szecsenke](https://wordpress.org/support/users/szecsenke/)
 * (@szecsenke)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/setting-background-via-css/#post-10658105)
 * Okay changed the theme, now i am back to #1 problem, same deal, need background
   for each page AND for the site itself, how do i do that? the solution that worked
   for the previous theme doesnt work for this (or any other ive tried and would
   fit my friend’s needs).
 * EDIT: solved it, now i just need help removing the .hero panel for the homepage,
   so it would look like the other pages
 * Can someone help?
    Thanks in advance!
    -  This reply was modified 7 years, 8 months ago by [szecsenke](https://wordpress.org/support/users/szecsenke/).

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

The topic ‘Setting background via css’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 3 participants
 * Last reply from: [szecsenke](https://wordpress.org/support/users/szecsenke/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/setting-background-via-css/#post-10658105)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
