# Making embedded JavaScript based discourse commenting responsive

**URL:** <https://meta.discourse.org/t/making-embedded-javascript-based-discourse-commenting-responsive/104039>\
**Category:** Product Support\
**Created:** [December 11, 2018, 6:51pm UTC](https://meta.discourse.org/t/making-embedded-javascript-based-discourse-commenting-responsive/104039 "2018-12-11T18:51:00Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Jane\_Jojo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jane_jojo/32/119485_2.png) [@Jane\_Jojo](https://meta.discourse.org/u/Jane_Jojo)\
**Post date:** [December 11, 2018, 6:51pm UTC](https://meta.discourse.org/t/making-embedded-javascript-based-discourse-commenting-responsive/104039/1 "2018-12-11T18:51:00Z")

</div>

I use discourse as the [commenting system](https://meta.discourse.org/t/embedding-discourse-comments-via-javascript/31963?source_topic_id=74803) and here’s an example

> **[Soya Chunks Masala Dry](https://alittlebitofspice.com/soya-chunks-masala-dry-recipe)**
>
> Learn how to make Soya Chunks Masala Dry, a healthy stir-fry with soya chunks cooked in spices and chilies. A flavorful side dish .

 ![IMG_1857](https://global.discourse-cdn.com/meta/original/3X/4/4/44add3f1814820d1c38c16727bbac1b4f7522059.png)

When you look at it from a mobile, you can see the content outside of the viewport.

How can I fix it to be responsive?

Here’s the code I use

```
<div id="comments" class="ct-post-end-section">
	<div id='discourse-comments'></div>
	<script type="text/javascript">
	  DiscourseEmbed = { discourseUrl: 'https://comments.alittlebitofspice.com/',
                     discourseEmbedUrl: '<?php echo get_permalink(); ?>' };
	  (function() {
	    var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
	    d.src = DiscourseEmbed.discourseUrl + 'javascripts/embed.js';
	    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);
	  })();
	</script>
</div><!-- #comments -->

```

---

_[View the full topic](https://meta.discourse.org/t/making-embedded-javascript-based-discourse-commenting-responsive/104039)._
