# Activating custom CSS/HTML

**URL:** https://meta.discourse.org/t/activating-custom-css-html/163369
**Category:** Support
**Created:** [September 8, 2020, 1:49pm UTC](https://meta.discourse.org/t/activating-custom-css-html/163369 "2020-09-08T13:49:19Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![lyseoy](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@lyseoy](https://meta.discourse.org/u/lyseoy)
#### Post date: [September 8, 2020, 1:49pm UTC](https://meta.discourse.org/t/activating-custom-css-html/163369/1 "2020-09-08T13:49:19Z")

</div>

I’ve added some custom CSS and HTML. Checked the preview, and everything looks great.

Now I want to commit these changes, but how? I don’t see any commands for this, and I tried rebuilding the discourse app, but nothing happens.

My searches come up empty. This is probably so easy, nobody ever asked how to do it, but this noob could use a hint…

---

<div class="post-metadata">

### Author: ![Bcat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bcat/32/163148_2.png) [@Bcat](https://meta.discourse.org/u/Bcat)
#### Post date: [September 8, 2020, 1:59pm UTC](https://meta.discourse.org/t/activating-custom-css-html/163369/2 "2020-09-08T13:59:26Z")

</div>

Seems irrelevant but I don’t really understand.

---

<div class="post-metadata">

### Author: ![Vaping\_Community](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vaping_community/32/89248_2.png) [@Vaping\_Community](https://meta.discourse.org/u/Vaping_Community)
#### Post date: [September 8, 2020, 2:39pm UTC](https://meta.discourse.org/t/activating-custom-css-html/163369/3 "2020-09-08T14:39:21Z")

</div>

> [@lyseoy](#):
>
> I’ve added some custom CSS and HTML.

Where? Custom Theme, default theme?  
Common css / desktop css / mobile css?  
More details on what you have done will be helpful.

Usually you just select a theme `/admin/customize/themes` and do this:

 ![Theme Css](https://global.discourse-cdn.com/meta/original/3X/d/7/d7432df994daec9d9633fd08f50c9a292053e25d.gif)

Once you hit that save button, changes show up pretty much instantly as long as the theme you have edited is active.

---

<div class="post-metadata">

### Author: ![lyseoy](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@lyseoy](https://meta.discourse.org/u/lyseoy)
#### Post date: [September 8, 2020, 2:43pm UTC](https://meta.discourse.org/t/activating-custom-css-html/163369/4 "2020-09-08T14:43:25Z")

</div>

What you did. In the video. Except I can only see the changes when I hit the Preview button.

---

<div class="post-metadata">

### Author: ![Vaping\_Community](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vaping_community/32/89248_2.png) [@Vaping\_Community](https://meta.discourse.org/u/Vaping_Community)
#### Post date: [September 8, 2020, 2:45pm UTC](https://meta.discourse.org/t/activating-custom-css-html/163369/5 "2020-09-08T14:45:37Z")

</div>

Have you got the theme selected as the active default theme? See the green tick?

 ![screenshot-vapingcommunity.co.uk-2020.09.08-15_44_09](https://global.discourse-cdn.com/meta/original/3X/8/a/8aad52f214b230ef33f42b4c9b8c02869cc4126f.png)

 ![screenshot-vapingcommunity.co.uk-2020.09.08-15_45_16](https://global.discourse-cdn.com/meta/original/3X/b/2/b25bfb7b17d0a4c4141bb11dc1922d03f7ebfc24.png)

---

<div class="post-metadata">

### Author: ![lyseoy](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@lyseoy](https://meta.discourse.org/u/lyseoy)
#### Post date: [September 8, 2020, 2:47pm UTC](https://meta.discourse.org/t/activating-custom-css-html/163369/6 "2020-09-08T14:47:40Z")

</div>

Yes. I’ve edited the standard light theme, and it’s active and default.

---

<div class="post-metadata">

### Author: ![Vaping\_Community](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vaping_community/32/89248_2.png) [@Vaping\_Community](https://meta.discourse.org/u/Vaping_Community)
#### Post date: [September 8, 2020, 2:49pm UTC](https://meta.discourse.org/t/activating-custom-css-html/163369/7 "2020-09-08T14:49:38Z")

</div>

Ok, can you list the changes you made please

Link to the website would also be helpful

---

<div class="post-metadata">

### Author: ![lyseoy](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@lyseoy](https://meta.discourse.org/u/lyseoy)
#### Post date: [September 8, 2020, 2:54pm UTC](https://meta.discourse.org/t/activating-custom-css-html/163369/8 "2020-09-08T14:54:50Z")

</div>

CSS:

> ```
> @import url("https://fonts.googleapis.com/css?family=Open+Sans:400, 400i, 700");
> .docked #main-outlet {
> margin-top: 0;
> }
> .docked nav#bar {
> display: none;
> }
> nav#bar {
> font-family: 'Open Sans', sans-serif;
> font-size: 16px;
> display: flex;
> align-items: center;
> justify-content: space-between;
> padding: 10px 20px;
> }
> nav#bar ul {
> display: inline-flex;
> list-style-type: none;
> margin: 0 0 0 25px;
> align-items: center;
> }
> nav#bar ul li {
> margin-left: 20px;
> }
> @media (max-width: 650px) {
> nav#bar {
> flex-wrap: wrap;
> justify-content: center;
> }
> nav#bar #logo {
> display: flex;
> justify-content: center;
> flex-basis: 100%}
> nav#bar #logo img {
> width: 120px;
> }
> nav#bar ul li {
> margin-left: 8px;
> }
> nav#bar ul li a {
> font-size: 14px;
> }
> nav#bar ul li a.www-btn {
> padding: 3px 8px 5px;
> }
> }
> nav#bar li a {
> text-decoration: none;
> color: #333;
> }
> nav#bar li a:hover {
> border-bottom: 5px solid;
> }
> nav#bar li:nth-of-type(1) a:hover {
> border-color: #D13239;
> }
> nav#bar li:nth-of-type(2) a:hover {
> border-color: #f15c22;
> }
> nav#bar li:nth-of-type(3) a:hover {
> border-color: #F2E88F;
> }
> nav#bar li:nth-of-type(4) a:hover {
> border-color: #00953A;
> }
> nav#bar li:nth-of-type(5) a {
> font-weight: bold;
> }
> nav#bar li:nth-of-type(5) a:hover {
> border-color: #14A0F4;
> }
> nav#bar img {
> width: 150px;
> height: auto;
> max-height: 40px;
> }
> nav#bar .www-btn {
> border: none;
> border-radius: 100px;
> background: #13a0f5;
> color: #fff;
> padding: 5px 20px 7px;
> }
> nav#bar .www-btn.big {
> font-size: 1.5rem;
> padding: 7px 30px 10px 30px;
> }
> nav#bar .www-btn:hover {
> background: #0a5783;
> }
> nav#bar .www-btn:active {
> background: #08476b;
> box-shadow: none;
> }
> nav#bar a.www-btn {
> text-decoration: none;
> color: #fff !important;
> }
> .d-header {
> background: linear-gradient(-90deg, #F2E88F, #a3e6ff);
> background-size: 100% 100%;
> background-repeat: repeat-x;
> box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.15);
> }
> .d-header .icons .icon {
> color: #555;
> }
> 
> ```

I’ll post the content of the Header in a bit. The forum keeps rendering the html when I paste it…

---

<div class="post-metadata">

### Author: ![Vaping\_Community](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vaping_community/32/89248_2.png) [@Vaping\_Community](https://meta.discourse.org/u/Vaping_Community)
#### Post date: [September 8, 2020, 2:58pm UTC](https://meta.discourse.org/t/activating-custom-css-html/163369/9 "2020-09-08T14:58:48Z")

</div>

> [@lyseoy](#):
>
> ```plaintext
> nav#bar #logo {
> display: flex;
> justify-content: center;
> flex-basis: 100%}
> 
> ```

This is wrong, it should be

```
nav#bar #logo {
    display: flex;
    justify-content: center;
    flex-basis: 100%;
}

```

---

<div class="post-metadata">

### Author: ![lyseoy](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@lyseoy](https://meta.discourse.org/u/lyseoy)
#### Post date: [September 8, 2020, 3:07pm UTC](https://meta.discourse.org/t/activating-custom-css-html/163369/10 "2020-09-08T15:07:59Z")

</div>

That’s it! Well spotted, you’ve got a keen eye!

Funny that the preview didn’t mind that syntax error.

---

<div class="post-metadata">

### Author: ![Vaping\_Community](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vaping_community/32/89248_2.png) [@Vaping\_Community](https://meta.discourse.org/u/Vaping_Community)
#### Post date: [September 8, 2020, 3:10pm UTC](https://meta.discourse.org/t/activating-custom-css-html/163369/11 "2020-09-08T15:10:45Z")

</div>

Glad you got it working 😄

- Any errors in your CSS will render that CSS void.
- I’ve never used preview before so I can’t comment on that.
- I’m sure there used to be an error notification on the page 🤔

Oh and Happy Birthday @tshenry 🎉 Have a good one

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [October 8, 2020, 3:13pm UTC](https://meta.discourse.org/t/activating-custom-css-html/163369/12 "2020-10-08T15:13:41Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
