# Annoying CSS issue with background image in my header

**URL:** <https://meta.discourse.org/t/annoying-css-issue-with-background-image-in-my-header/108204>\
**Category:** Product Support\
**Created:** [February 2, 2019, 11:11am UTC](https://meta.discourse.org/t/annoying-css-issue-with-background-image-in-my-header/108204 "2019-02-02T11:11:57Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)\
**Post date:** [February 4, 2019, 11:20am UTC](https://meta.discourse.org/t/annoying-css-issue-with-background-image-in-my-header/108204/4 "2019-02-04T11:20:52Z")

</div>

The issue you’re seeing occurs because you’ve set a background on the `<html>` tag and gave it a position manually with the [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) property.

In the background component there’s a rule that looks like this:

```plaintext
html {
  background-position: 50% 30px;
}

```

This centers the background horizontally and pushes it down by `30px` vertically.

Since you didn’t set a [background-repeat](https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat) property, it defaults to `repeat` which means that when you push the background-image by `30px` vertically, it will repeat itself in that space.

There are a couple of way to fix this, but I’ve opted for the simplest option.

I changed to background-position property in your theme from

```plaintext
html {
  background-position: 50% 30px;
}

```

to

```plaintext
html {
  background-position: center;
}

```

which should center the background and stop it from repeating and fix the issue on your site

[https://global.discourse-cdn.com/meta/original/3X/6/7/672df117569beb9f0a92f5b01569fbb55a3c4203.mp4](https://global.discourse-cdn.com/meta/original/3X/6/7/672df117569beb9f0a92f5b01569fbb55a3c4203.mp4)

---

_[View the full topic](https://meta.discourse.org/t/annoying-css-issue-with-background-image-in-my-header/108204)._
