HTML5 and CSS3

  • Profile Image
    dobbertjeduik
    Asked on December 29, 2012 at 08:50 AM

    Hi,

    Is it possible to change the by JotForm provided iframes ? My page is in HTML5 and CSS3 and when I run the page through (is that English?)a checker it states that frameborder and the scrolling attribute are obsolete and they suggest that I use CSS instead. Can I change your iframe form line without problems ?

     

    Thanks.

  • Profile Image
    EduardoMendez
    Answered on December 29, 2012 at 09:36 AM

    Hi there, 

    Changing the iFrame code should not be a problem.  You can set attributes to the iFrame using CSS. Here is a comparison of the two methods:

    Current code:

     

    <iframe onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="//form.jotformpro.com/form/23630925667965" frameborder="0" style="width:100%; height:465px; border:none;" scrolling="no">

    </iframe>

    CSS with scrolling off:

     

    <iframe onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="//form.jotformpro.com/form/23630925667965" style="overflow: hidden; width:100%; height:465px; border:none; margin: 0; padding: 0;">

    </iframe>

    I hope this helps!  Let us know if you need further assistance! 

     

     

  • Profile Image
    dobbertjeduik
    Answered on December 29, 2012 at 10:38 AM

    Hi,

    Your solution works great.

    I changed it to:

    <style type="text/css">
         iframe.c1 {overflow: hidden; width:96%; height:530px; border:none; margin: 0; padding: 0;}
         div.c3 {text-align: center}
     </style>

     

    <div class="c3">
           <iframe src="//www.jotformeu.com/form/23279248104352" class="c1"></iframe>
    </div>

    Now it passes the validation checker HTML5

    Thanks for your fast solution (again)