Made tabs on html / css for example. Tabs only work if they contain plain text. If you insert a form, it is not displayed at all. The code appears in the console
/* Π±Π°Π·ΠΎΠ²ΡΠΉ ΠΊΠΎΠ½ΡΠ΅ΠΉΠ½Π΅Ρ ΡΠ°Π±ΠΎΠ² */ .tabs { min-width: 320px; max-width: 800px; padding: 0px; margin: 0 auto; } /* ΡΡΠΈΠ»ΠΈ ΡΠ΅ΠΊΡΠΈΠΉ Ρ ΡΠΎΠ΄Π΅ΡΠΆΠ°Π½ΠΈΠ΅ΠΌ */ section.tabs2 { display: none; padding: 15px; background: #fff; border: 1px solid #ddd; } .tabs input { display: none; } /* ΡΡΠΈΠ»ΠΈ Π²ΠΊΠ»Π°Π΄ΠΎΠΊ (ΡΠ°Π±ΠΎΠ²) */ .tabs label { display: inline-block; margin: 0 0 -1px; padding: 15px 25px; font-weight: 600; text-align: center; color: #aaa; border: 1px solid #ddd; background: #f1f1f1; border-radius: 3px 3px 0 0; } /* ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΡ ΡΡΠΈΠ»Ρ Π·Π°Π³ΠΎΠ»ΠΎΠ²ΠΊΠΎΠ² Π²ΠΊΠ»Π°Π΄ΠΎΠΊ ΠΏΡΠΈ Π½Π°Π²Π΅Π΄Π΅Π½ΠΈΠΈ */ .tabs label:hover { color: #888; cursor: pointer; } /* ΡΡΠΈΠ»ΠΈ Π΄Π»Ρ Π°ΠΊΡΠΈΠ²Π½ΠΎΠΉ Π²ΠΊΠ»Π°Π΄ΠΊΠΈ */ .tabs input:checked + label { color: #555; border: 1px solid #ddd; border-top: 1px solid #009933; border-bottom: 1px solid #fff; background: #fff; } /* Π°ΠΊΡΠΈΠ²Π°ΡΠΈΡ ΡΠ΅ΠΊΡΠΈΠΉ Ρ ΠΏΠΎΠΌΠΎΡΡΡ ΠΏΠ΅ΡΠ΅ΠΊΠ»ΡΡΠ°ΡΠ΅Π»Ρ :checked */ #tab1:checked ~ #content1, #tab2:checked ~ #content2, #tab3:checked ~ #content3, #tab4:checked ~ #content4 { display: block; } /* ΠΌΠ΅Π΄ΠΈΠ° Π·Π°ΠΏΡΠΎΡΡ Π΄Π»Ρ ΡΠ°Π·Π»ΠΈΡΠ½ΡΡ
ΡΠΈΠΏΠΎΠ² Π½ΠΎΡΠΈΡΠ΅Π»Π΅ΠΉ */ @media screen and (max-width: 680px) { .tabs label { font-size: 0; } .tabs label:before { margin: 0; font-size: 18px; } } @media screen and (max-width: 400px) { .tabs label { padding: 15px; } } <div class="tabs"> <input id="tab1" type="radio" name="tabs" checked> <label for="tab1" title="Π²ΠΊΠ»Π°Π΄ΠΊΠ° 1">ΠΡ
ΠΎΠ΄</label> <input id="tab2" type="radio" name="tabs"> <label for="tab2" title="Π²ΠΊΠ»Π°Π΄ΠΊΠ° 2">Π Π΅Π³ΠΈΡΡΡΠ°ΡΠΈΡ</label> <section class="tabs2" id="content1"> <form id="modal-form"> <div id="fields"> <p><input name="email" placeholder="Email" id="contact-modal-form-imya"></p> <p><input name="password" placeholder="Password" id="contact-modal-form-phone" type="password"></p> <p><input type="submit" value="ΠΠΎΠΉΡΠΈ" id="contact-modal-form-bttn"></p> </div> </form> </section> <section class="tabs2" id="content2"> <form id="modal-form"> <div id="fields2"> <p><input name="email" placeholder="Email" id="contact-modal-form-imya"></p> <p><input name="password" placeholder="Password" id="contact-modal-form-phone" type="password"></p> <p><input name="promo" placeholder="ΠΡΠΎΠΌΠΎΠΊΠΎΠ΄" id="contact-modal-form-imya"></p> <p><input type="submit" value="Π Π΅Π³ΠΈΡΡΡΠ°ΡΠΈΡ" id="contact-modal-form-bttn"></p> </div> </form> </section> </div>
.tabs input { display: none; }.tabs input { display: none; }?? - Igor