# Why don't background codes work in full screen chat page?

**URL:** https://meta.discourse.org/t/why-dont-background-codes-work-in-full-screen-chat-page/310204
**Category:** Development
**Created:** [June 1, 2024, 3:40pm UTC](https://meta.discourse.org/t/why-dont-background-codes-work-in-full-screen-chat-page/310204 "2024-06-01T15:40:02Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ogulcan1787](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ogulcan1787/32/128589_2.png) [@ogulcan1787](https://meta.discourse.org/u/ogulcan1787)
#### Post date: [June 1, 2024, 3:40pm UTC](https://meta.discourse.org/t/why-dont-background-codes-work-in-full-screen-chat-page/310204/1 "2024-06-01T15:40:02Z")

</div>

Hi everyone.  
Why don’t the codes that work for the home page work in the background of the chat room?

 ![Ekran görüntüsü 2024-06-01 183315](https://global.discourse-cdn.com/meta/original/4X/6/c/6/6c660feb26037ed1b71ff9efff401b4284d1b64f.png)  
 ![Ekran görüntüsü 2024-06-01 183322](https://global.discourse-cdn.com/meta/original/4X/c/5/2/c52976759d02cc65fc01ea4ec81d2f7b154cdac6.png)

There is a bad view right now, when the chat room is in full screen.

My codes for background and body

```plaintext
body {
  background-color: #1a1a2b;
}

body:before {
  display: inline-block;
  border-radius: 10px;
  width: 1125px;
  height: inherit;
  background-color: #26263B;
  content: " ";
  position: absolute;
  left: 50%;
  right: 0;
  top: 72px;
  bottom: 11px;
  transform: translate(-50%, 0);
  box-shadow: 0px 0px 20px 5px rgba(0,0,0,0.3);  
}

body {
  position: relative;
}

```

```plaintext
body {
  background-image: url("https://pvpfarm.com/uploads/default/original/1X/1b5dd68a865855193164193f21e08630a3ed6da6.png");
  background-size: 240px;
  background-repeat: repeat;
  background-attachment: local;
}

```

---

<div class="post-metadata">

### Author: ![ogulcan1787](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ogulcan1787/32/128589_2.png) [@ogulcan1787](https://meta.discourse.org/u/ogulcan1787)
#### Post date: [June 3, 2024, 4:56pm UTC](https://meta.discourse.org/t/why-dont-background-codes-work-in-full-screen-chat-page/310204/2 "2024-06-03T16:56:18Z")

</div>

I don’t want to spam this topic but can anyone help?  
I tried many ways but it doesn’t work.

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [June 4, 2024, 12:14am UTC](https://meta.discourse.org/t/why-dont-background-codes-work-in-full-screen-chat-page/310204/3 "2024-06-04T00:14:25Z")

</div>

I wanted to look at your site, but the chat seems to be disabled for me.

I tested locally, and your CSS seems to work fine.

 ![image](https://global.discourse-cdn.com/meta/original/4X/5/c/a/5ca154b950dda20abaab54e80289d4d3224a3a59.png)

It might be possible that some other CSS code overwrites your background or prevents it from displaying properly.

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [June 4, 2024, 12:31am UTC](https://meta.discourse.org/t/why-dont-background-codes-work-in-full-screen-chat-page/310204/4 "2024-06-04T00:31:27Z")

</div>

I had a look and I couldn’t get that image path to work properly. You should instead upload that image into your assets folder for the theme, and then as a variable in CSS use:

```scss
background-image: url($image_variable_name);

```

where `image_variable_name` is what you give it when you upload it.

---

<div class="post-metadata">

### Author: ![ogulcan1787](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ogulcan1787/32/128589_2.png) [@ogulcan1787](https://meta.discourse.org/u/ogulcan1787)
#### Post date: [June 4, 2024, 5:58am UTC](https://meta.discourse.org/t/why-dont-background-codes-work-in-full-screen-chat-page/310204/5 "2024-06-04T05:58:46Z")

</div>

Thank you for spending your precious time on my problem. @Arkshine @Lilly  
I set your member level to 2. You can enter the chat area.

Yes, a few CSS codes were causing problems.  
I edited it, but this time there was a space at the bottom of the chat area.

 ![Ekran görüntüsü 2024-06-04 085015](https://global.discourse-cdn.com/meta/original/4X/8/8/4/88452309e3f8652b78dddaab4b09aab8b7a9c964.png)

And the `bottom` code in the `body:before` code does not work.  
I can’t fix this right now.

@Lilly If I understood what you wrote correctly, this is how I uploaded the photo.

![Ekran görüntüsü 2024-06-04 085453](https://global.discourse-cdn.com/meta/original/4X/3/a/d/3ad2eb86928d7186c5ac38d14e004fd6dd5879f8.png)

By the way, I made this design with zero CSS knowledge. That’s why I may make many mistakes. Thanks to you, I am learning from my mistakes. 🙏

---

<div class="post-metadata">

### Author: ![ogulcan1787](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ogulcan1787/32/128589_2.png) [@ogulcan1787](https://meta.discourse.org/u/ogulcan1787)
#### Post date: [June 4, 2024, 1:09pm UTC](https://meta.discourse.org/t/why-dont-background-codes-work-in-full-screen-chat-page/310204/6 "2024-06-04T13:09:05Z")

</div>

```plaintext
.has-full-page-chat:not(.discourse-sidebar) #main-outlet {
  height: auto;
  position: absolute;
  left: 50%;
  right: 0;
  top: auto;
  bottom: auto;
  transform: translate(-50%, 0);
  box-shadow: 0px 0px 20px 5px rgba(0,0,0,0.3);
}

```

I am currently using these codes and they are working.  
Please correct me if I’m wrong. Thanks
