# \#main-outlet bg hides custom category background when making a topic a banner

**URL:** https://meta.discourse.org/t/main-outlet-bg-hides-custom-category-background-when-making-a-topic-a-banner/26359
**Category:** Bug
**Created:** [3월 15, 2015, 10:41오전 UTC](https://meta.discourse.org/t/main-outlet-bg-hides-custom-category-background-when-making-a-topic-a-banner/26359 "2015-03-15T10:41:09Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jamesmarkcook](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamesmarkcook/32/168563_2.png) [@jamesmarkcook](https://meta.discourse.org/u/jamesmarkcook)
#### Post date: [3월 15, 2015, 10:41오전 UTC](https://meta.discourse.org/t/main-outlet-bg-hides-custom-category-background-when-making-a-topic-a-banner/26359/1 "2015-03-15T10:41:09Z")

</div>

Steps to reproduce:

1. Set a custom background on a category
2. Enter a topic in this category and from the topic settings menu make it a banner topic

If you perform the two steps above, the #main-outlet div background goes from being transparent to a block colour which hides the custom category background. Now, this _may_ be a feature, but it looks nasty in my browser.

---

<div class="post-metadata">

### Author: ![mbs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mbs/32/115465_2.png) [@mbs](https://meta.discourse.org/u/mbs)
#### Post date: [3월 26, 2015, 2:39오후 UTC](https://meta.discourse.org/t/main-outlet-bg-hides-custom-category-background-when-making-a-topic-a-banner/26359/2 "2015-03-26T14:39:48Z")

</div>

this seems to happen to me too, if I understood the issue correctly.

When I set a custom background images, posts within topics have no table white background, rather it’s just the custom background being displayed, and it’s not the best for clarity purposes.

Other things such as “suggested topics” properly display the background color.

I can provide examples if needed.

---

<div class="post-metadata">

### Author: ![elberet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elberet/32/122404_2.png) [@elberet](https://meta.discourse.org/u/elberet)
#### Post date: [3월 26, 2015, 3:08오후 UTC](https://meta.discourse.org/t/main-outlet-bg-hides-custom-category-background-when-making-a-topic-a-banner/26359/3 "2015-03-26T15:08:50Z")

</div>

Yeah, category background images aren’t well supported by the default styles. You’ll probably want to customize them quite a bit.

Here’s my solution:  
[https://meta.discourse.org/t/category-background-images/24403/24?u=elberet](https://meta.discourse.org/t/category-background-images/24403/24)

---

<div class="post-metadata">

### Author: ![mbs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mbs/32/115465_2.png) [@mbs](https://meta.discourse.org/u/mbs)
#### Post date: [3월 26, 2015, 3:19오후 UTC](https://meta.discourse.org/t/main-outlet-bg-hides-custom-category-background-when-making-a-topic-a-banner/26359/4 "2015-03-26T15:19:04Z")

</div>

> [@elberet](#):
>
> Yeah, category background images aren’t well supported by the default styles. You’ll probably want to customize them quite a bit.
> 
> Here’s my solution:  
> [https://meta.discourse.org/t/category-background-images/24403/24?u=elberet](https://meta.discourse.org/t/category-background-images/24403/24)

I see.

This means I cannot just use the category background image to upload a category image, and I have to edit custom CSS to only apply the background within a certain category.

Actually – what I did was to just apply the white from the topic you linked, so if a topic has its own background, cool, otherwise it’s standard Discourse.

That’s perfect, thanks again 😃

Though I believe it’s something to be fixed eventually?

---

<div class="post-metadata">

### Author: ![elberet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elberet/32/122404_2.png) [@elberet](https://meta.discourse.org/u/elberet)
#### Post date: [3월 26, 2015, 3:28오후 UTC](https://meta.discourse.org/t/main-outlet-bg-hides-custom-category-background-when-making-a-topic-a-banner/26359/5 "2015-03-26T15:28:46Z")

</div>

> [@mbs](#):
>
> This means I cannot just use the category background image to upload a category image

No, that works fine. It’s just that the default styles aren’t prepared for a colorful background so things look off.

But yes, my snippet is taken from my own forum and part of a larger customization. It’s a demo on what can be done, not what must be done. 😉 If you simply remove the `html` and `.d-header` blocks as well as the borders, **bottom** margin and padding on `#main-outlet` and set a white background, you basically get the same result without the weird `body:before` thing. 😃
