Full width modal with iframe

Full width modal with iframe


I want to add the following to a code snippet but it is not working

you can see what it is suppose to do here

https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_overlay2

Your code snippet functionality does not work like most other similar products
(as an example the visual editor in wordpress)

If you past the code into a code snippet you will see what I mean

Thanks for any help with this
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta name="viewport" content="width=device-width, initial-scale=1">
  5. <style>
  6. body {
  7.   font-family: 'Lato', sans-serif;
  8. }

  9. .overlay {
  10.   height: 0%;
  11.   width: 100%;
  12.   position: fixed;
  13.   z-index: 1;
  14.   top: 0;
  15.   left: 0;
  16.   background-color: rgb(0,0,0);
  17.   background-color: rgba(0,0,0, 0.9);
  18.   overflow-y: hidden;
  19.   transition: 0.5s;
  20. }

  21. .overlay-content {
  22.   position: relative;
  23.   top: 8%;
  24.   overflow: hidden;
  25.   padding-top: 100%
  26. }

  27. .overlay-content iframe {
  28.   position: absolute;
  29.     top: 0;
  30.     left: 0;
  31.     width: 100%;
  32.     height: 78%;
  33.     border: 0;
  34. }

  35. .overlay a {
  36.   padding: 8px;
  37.   text-decoration: none;
  38.   font-size: 36px;
  39.   color: #818181;
  40.   display: block;
  41.   transition: 0.3s;
  42. }

  43. .overlay a:hover, .overlay a:focus {
  44.   color: #f1f1f1;
  45. }

  46. .overlay .closebtn {
  47.   position: absolute;
  48.   top: 0;
  49.   right: 45px;
  50.   font-size: 60px;
  51.   margin-top: -5px;
  52. }

  53. @media screen and (max-height: 450px) {
  54.   .overlay {overflow-y: auto;}
  55.   .overlay a {font-size: 20px}
  56.   .overlay .closebtn {
  57.   font-size: 40px;
  58.   top: 15px;
  59.   right: 35px;
  60.   }
  61. }
  62. </style>
  63. </head>
  64. <body>

  65. <div id="myNav" class="overlay">
  66.   <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a>
  67.   <div class="overlay-content">
  68.    <iframe frameborder="0"  src='https://forms.zohopublic.com/greaterthanthesum/form/ContactForm/formperma/N2N8CmJYyQUPVOgfRQRi1R0iplUGVyEng16Cm1JGpz0'></iframe>
  69.   </div>
  70. </div>

  71. <h2>Fullscreen Overlay Nav Example</h2>
  72. <p>Click on the element below to open the fullscreen overlay navigation menu.</p>
  73. <p>In this example, the navigation menu will slide downwards from the top:</p>
  74. <span style="font-size:30px;cursor:pointer" onclick="openNav()">&#9776; open</span>

  75. <script>
  76. function openNav() {
  77.   document.getElementById("myNav").style.height = "100%";
  78. }

  79. function closeNav() {
  80.   document.getElementById("myNav").style.height = "0%";
  81. }
  82. </script>
  83.      
  84. </body>
  85. </html>


      • Sticky Posts

      • Unveiling Zoho Sites 2.0 - A new dimension in website building

        Dear Zoho Sites Users, We are thrilled to announce the launch of Zoho Sites 2.0 today! This refresh represents a significant step forward in the capabilities of Zoho Sites and is crucial for creating a lasting and positive impact on our customers' businesses.
      • Website Accessibility

        I have two sites created in Zoho Sites which are both live. Some questions: 1. Are any of the template themes WCAG 2.1 AA compliant? 2. How do I change the format of a sub-heading in the header section? 3. Is there any way to add focus indication for
      • Visual Editor Webinar

        Join our FREE live webinar to learn how to use the Zoho Sites Visual Editor to easily design your website. Our product specialist will demonstrate how this tool will help you customize your website to suit your requirements.  Register here: https://www.zoho.com/sites/webinars/
      • SEO for your Zoho Sites Website

        Join our live webinar to learn how to use Zoho Sites' SEO tools to boost your website's ranking. Our product specialist will demonstrate everything you need to know about optimizing your web pages to make them search engine friendly. Register here for free: https://www.zoho.com/sites/webinars/
      • Zoho Sites Webinar | Integrations

        Join our FREE live webinar to learn how to integrate both Zoho and third-party products with your Zoho Sites website. Our product expert will demonstrate how to use these integrations to grow, manage, and retain the customers you bring in. Learn how to take your business forward and build stunningly robust and efficient websites. Register here: https://www.zoho.com/sites/webinars/