# What's wrong with this CSS?

**URL:** <https://meta.discourse.org/t/whats-wrong-with-this-css/28391>\
**Category:** Product Support\
**Created:** [6. Mai 2015 um 18:38 UTC](https://meta.discourse.org/t/whats-wrong-with-this-css/28391 "2015-05-06T18:38:49Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Qasem\_h](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/qasem_h/32/155935_2.png) [@Qasem\_h](https://meta.discourse.org/u/Qasem_h)\
**Post date:** [6. Mai 2015 um 19:16 UTC](https://meta.discourse.org/t/whats-wrong-with-this-css/28391/3 "2015-05-06T19:16:19Z")

</div>

TRY THIS CODE

```
    // solid white background for content
    body:before {
        display: inline-block;
        width: 1125px;
        min-height: 100%;
        height: inherit;
        background-color: white;
        content: " ";
        position: fixed;
        left: 50%;
        right: 0;
        transform: translate(-50%, 0);
        -webkit-transform: translate(-50%, 0);
    }
    
    // compatibility for all devices
    @media (max-width: 1139px) and (min-width: 1000px)
    {
        body:before {
            width: 1010px;
        }
    }
    
    .d-header {
        box-shadow: none;
    }
    
    body {
      background: url('http://minecraftrad.io/images/bg1.jpg') no-repeat 50% 50% fixed; 
      background-size: cover;
      -moz-background-size: cover;
      -o-background-size: cover;
      -webkit-background-size: cover;

}

```

JUST FOR BACKGROUND YOU NEED FOR THIS

```
body {
          background: url('http://minecraftrad.io/images/bg1.jpg') no-repeat 50% 50% fixed; 
          background-size: cover;
          -moz-background-size: cover;
          -o-background-size: cover;
          -webkit-background-size: cover;
 }

```

---

_[View the full topic](https://meta.discourse.org/t/whats-wrong-with-this-css/28391)._
