+ 6

Need some help for the html code

please help me , why does the contents appear when the page is loaded and how do i only make it visible when i click on the buttons https://code.sololearn.com/WHB0W6Q0pv8W/?ref=app

20th Feb 2017, 3:31 PM
Akshata
Akshata - avatar
6 Antwoorden
+ 12
Add this CSS inside <style> : .tabcontent{display:none;}
20th Feb 2017, 3:45 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 12
It shows after click.
20th Feb 2017, 3:47 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 6
yes it worked ty
20th Feb 2017, 3:47 PM
Akshata
Akshata - avatar
+ 4
but then it doesnt show any content
20th Feb 2017, 3:46 PM
Akshata
Akshata - avatar
+ 4
i had used visibility :hidden
20th Feb 2017, 3:47 PM
Akshata
Akshata - avatar
+ 4
this example is from w3schools and the one you are trying is simple which will do appear only when you click it it happens there too. to make one tab visible you have to make one active see their next example where they make one tab active and try that. for here you can add JavaScript click () method to automatically click in tab and it will become active. or make in css first-child{display:block} or you can change style="..." but then it need change in js to element.style.display instead of classes
20th Feb 2017, 4:03 PM
Sandeep Chatterjee