# Page Background not working with dark mode

**URL:** <https://forums.realmacsoftware.com/t/page-background-not-working-with-dark-mode/48447>\
**Category:** Elements\
**Created:** [June 28, 2025, 12:26pm UTC](https://forums.realmacsoftware.com/t/page-background-not-working-with-dark-mode/48447 "2025-06-28T12:26:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![WeaverPixel](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/weaverpixel/32/25453_2.png) [@WeaverPixel](https://forums.realmacsoftware.com/u/WeaverPixel)\
**Post date:** [June 28, 2025, 12:26pm UTC](https://forums.realmacsoftware.com/t/page-background-not-working-with-dark-mode/48447/1 "2025-06-28T12:26:45Z")

</div>

Hi guys,

I have a problem with light/dark mode page background in the browser.

That’s how it is set in Elements

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/9/9/9977cd3f73d5e8c576462077d27f8b5d62f894cc.png)

It shows like this in the Elements “preview”  
 ![image](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/optimized/3X/0/0/00ce4e94e87c8ac73f989628dfb04a910e0657bd_2_690x31.png)  
 ![image](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/optimized/3X/0/d/0d0730cddd014323815e52fbd04c3c6d29066f4d_2_690x31.png)

What is exactly fine.

But in the browser ist shows  
 ![A website navigation bar featuring the logo 'flexon', menu options, and an orange 'Learn More' button on the right. (Captioned by AI)](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/optimized/3X/e/2/e2333c87810401a6656b62ae4082c58a3df6642f_2_690x31.png)  
 ![image](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/optimized/3X/f/4/f4ac34fd6ae1c1ea29ef5fe82d90583f9122239b_2_690x31.png)

Looks like a bug? Or is this happening only on my machine?

---

<div class="post-metadata">

**Author:** ![dan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/dan/32/28516_2.png) [@dan](https://forums.realmacsoftware.com/u/dan)\
**Post date:** [June 28, 2025, 8:01pm UTC](https://forums.realmacsoftware.com/t/page-background-not-working-with-dark-mode/48447/2 "2025-06-28T20:01:23Z")

</div>

Can you share your project via Elements Cloud so I can take a look?

It only needs to include the menu. Then, we’ll look into what’s going on and get it fixed for you 😊

---

<div class="post-metadata">

**Author:** ![dan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/dan/32/28516_2.png) [@dan](https://forums.realmacsoftware.com/u/dan)\
**Post date:** [June 28, 2025, 8:05pm UTC](https://forums.realmacsoftware.com/t/page-background-not-working-with-dark-mode/48447/3 "2025-06-28T20:05:05Z")

</div>

Oh, I just had a thought… Is this an old project?

The only reason I ask is because I wonder if your Site Template is out of date and missing the following classes from the body tag:

```auto
<body class="{{page.bodyClasses}}" {{page.bodyAttributes}}>

```

 ![CleanShot 2025-06-28 at 9 .03.33@2x](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/d/0/d0bfe3b8f25180ab62ea610fdbbb9002e42e34ff.jpeg)

---

<div class="post-metadata">

**Author:** ![WeaverPixel](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/weaverpixel/32/25453_2.png) [@WeaverPixel](https://forums.realmacsoftware.com/u/WeaverPixel)\
**Post date:** [June 28, 2025, 8:28pm UTC](https://forums.realmacsoftware.com/t/page-background-not-working-with-dark-mode/48447/4 "2025-06-28T20:28:00Z")

</div>

You are my hero 🤣

My site template was exactly missing that classes. I copied it in and now it is working.

It is a project I am working since some months to have a kind of template library available where users can copy sections into their project. It is like your core library but with some extensions 😀

Would you suggest to copy all my content to a new project to prevent some old stuff is still somewhere around?

Thanks for your help!
