# Using .Inner shortcode to add style

**URL:** <https://discourse.gohugo.io/t/using-inner-shortcode-to-add-style/19631>\
**Category:** support\
**Created:** [July 13, 2019, 1:59pm UTC](https://discourse.gohugo.io/t/using-inner-shortcode-to-add-style/19631 "2019-07-13T13:59:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nobby](https://avatars.discourse-cdn.com/v4/letter/n/df788c/32.png) [@nobby](https://discourse.gohugo.io/u/nobby)\
**Post date:** [July 13, 2019, 1:59pm UTC](https://discourse.gohugo.io/t/using-inner-shortcode-to-add-style/19631/1 "2019-07-13T13:59:43Z")

</div>

I’ve recently upgraded to the newest version of Hugo, and tried to follow along on the shortcode discussions, but I’m unsure how to do this.

In my content file, I have a blog post. Everything is written in markdown, there is no html. For one particular paragraph, I’d like to add an `html div` with custom styling. I’m using the tailwinds framework.

Markdown file:

```
Lorem ipsum dolor sit amet, consectetur adipiscing elit. 

{{< blog/style "bg-red" >}}
Ut enim ad minim veniam, quis nostrud exercitation.
{{< /blog/style >}}

Duis aute irure dolor in reprehenderit in voluptate.

```

My shortcode:

`<div class="{{.Get 0}}">{{ .Inner | markdownify}}</div>`

The above works, but an empty div is created in the html output around the entire blog post. If I change the shortcode to:

`<div class="bg-red">{{ .Inner | markdownify}}</div>`

and change it as well in the blog post, `{{< blog/style >}}`, the entire blog post gets the div styling.

So I’m a bit confused, as I thought by closing the shortcode, it would only apply to a particular section of my content.

---

<div class="post-metadata">

**Author:** ![maiki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/maiki/32/16384_2.png) [@maiki](https://discourse.gohugo.io/u/maiki)\
**Post date:** [July 13, 2019, 5:04pm UTC](https://discourse.gohugo.io/t/using-inner-shortcode-to-add-style/19631/2 "2019-07-13T17:04:33Z")

</div>

If you share a repo per [Requesting Help](https://discourse.gohugo.io/t/requesting-help/9132), someone can clone it and see what’s going on. 🙂
