user3261680 user3261680 - 3 months ago 27
CSS Question

How to get my iframe code to display correctly in django cms?

I am using django cms to create my website and a google calendar. However, when I added the code, it comes up as just plain code and won't display the calendar.
here is the link to my site:
http://138.68.6.151:8000/en/events
Can someone explain how to fix this?

Answer

After going to your site and using browser's console to inspect your iframe, I found that you have used the iframe tag incorrectly (like a text in quotes) and therefore its not rendering properly. In your paragraph tag, use the iframe tag in the following way:

<p><iframe frameborder="0" height="500" scrolling="no" src="https://calendar.google.com/calendar/embed?height=500&amp;amp;wkst=1&amp;amp;bgcolor=%23FFFFFF&amp;amp;src=6uemf0u3aqg89knqb4ndic0n04%40group.calendar.google.com&amp;amp;color=%23853104&amp;amp;ctz=America%2FChicago" style="border-width:0" width="500"></iframe></p>

Previous state (also notice the HTML code on the right)

enter image description here

After making above mentioned changes in the code (notice on the right that now the iframe tag is highlighted as a tag which was not the case previously):

enter image description here