# Adding HTML classes in posts doesn't appear to work

**URL:** <https://meta.discourse.org/t/adding-html-classes-in-posts-doesnt-appear-to-work/62275>\
**Category:** Product Support\
**Created:** [8. Mai 2017 um 03:46 UTC](https://meta.discourse.org/t/adding-html-classes-in-posts-doesnt-appear-to-work/62275 "2017-05-08T03:46:36Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![boisy](https://avatars.discourse-cdn.com/v4/letter/b/5daacb/32.png) [@boisy](https://meta.discourse.org/u/boisy)\
**Post date:** [8. Mai 2017 um 03:46 UTC](https://meta.discourse.org/t/adding-html-classes-in-posts-doesnt-appear-to-work/62275/1 "2017-05-08T03:46:36Z")

</div>

I am trying to add an adaptive grid to our discourse site. In my custom CSS I have:

```
.grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  max-width: 1000px;
  margin-left: -5px;
  margin-right: -5px;
}

.grid-item {
  max-width: 160px;
  margin-bottom: 20px;
  margin-left: 5px;
  margin-right: 5px;
}

.grid-item img {
  width: 100%;
}

```

I have a post on our forum here: [http://discuss.affectiva.com/t/face-metrics-in-the-emotion-sdk/51](http://discuss.affectiva.com/t/face-metrics-in-the-emotion-sdk/51) that has the following:

```
<div class="grid">
  <div class="grid-item">
    <img src="/uploads/affectiva/original/1X/3532685ede3eaf46d50d77d6f545211c56192cc0.jpg" alt="" />
    <p class="thicker">Anger</p>
  </div>

```

However, the CSS doesn’t seem to take effect. In fact, when I look at the source to the page when I load it, I see that the class=“grid” and class=“grid-item” attributes are gone.

Is discourse stripping the class attributes? If so, can I prevent this from happening?

---

_[View the full topic](https://meta.discourse.org/t/adding-html-classes-in-posts-doesnt-appear-to-work/62275)._
