# Problem with highlight shortcode

**URL:** <https://discourse.gohugo.io/t/problem-with-highlight-shortcode/46259>\
**Category:** support\
**Tags:** highlight, shortcodes\
**Created:** [September 17, 2023, 4:22pm UTC](https://discourse.gohugo.io/t/problem-with-highlight-shortcode/46259 "2023-09-17T16:22:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidoc26](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/davidoc26/32/19648_2.png) [@davidoc26](https://discourse.gohugo.io/u/davidoc26)\
**Post date:** [September 17, 2023, 4:22pm UTC](https://discourse.gohugo.io/t/problem-with-highlight-shortcode/46259/1 "2023-09-17T16:22:15Z")

</div>

So I’m getting a problem with highlight shortcode, maybe it’s a layout issue, but on phone screens it breaks the page. It adds a horizontal scroll, and also literally cuts off the left side of the page (it’s impossible to scroll there, you can see it on the screenshot).

 ![problem](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/3X/1/5/1556f19b1fdac9887e0299e02566cb793ea1f767.png)

I’ve already tried playing with `.highlight` , for example, setting `overflow-y: auto`; or something like that, but it didn’t work.  
What really helped was `@media` with lowering the font-size, but I think this is too bad and the problem appears again if the code in the shortcode is long. I also tried to wrap it, but it didn’t lead to anything.

[Here](https://github.com/Davidoc26/davidoc26.github.io/blob/c86343db228ce4f8132fccbe7e1a9a2cd1f10cab/content/english/programming/should-you-use-nvim.md?plain=1#L92) is the code where I am using shortcode, and layout for [single page](https://github.com/Davidoc26/davidoc26.github.io/blob/c86343db228ce4f8132fccbe7e1a9a2cd1f10cab/layouts/_default/single.html)

And I don’t really understand if this is really related to styles or if it’s a shortcode bug.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [September 17, 2023, 6:44pm UTC](https://discourse.gohugo.io/t/problem-with-highlight-shortcode/46259/2 "2023-09-17T18:44:16Z")

</div>

> [@davidoc26](#):
>
> if this is really related to styles

Yes, it is.

> [@davidoc26](#):
>
> if it’s a shortcode bug

No, it is not.
