+ 1

I dont understand why to use display:none; ?? We could have simply delete the test we want.

21st Apr 2017, 11:08 PM
pavan pandya
pavan pandya - avatar
4 Answers
+ 12
As @Agus suggested, for example, the menu in my code is setted like "display:none" and when you click on the top-right menu, he change his property in "display:block", and you can see it. This is one of the advantage to use "display: none"... you can create many "Toggle Effects" with your HTML elements. https://code.sololearn.com/WudXK2O6iHeQ/?ref=app
21st Apr 2017, 11:51 PM
Maz
Maz - avatar
+ 8
if you want to change the display later, it will be better to keep that. (to maintain long and dynamic webpage)
21st Apr 2017, 11:15 PM
Agus Mei
Agus Mei - avatar
+ 8
of course you can @pavan. it will make your code shorter and better.
21st Apr 2017, 11:39 PM
Agus Mei
Agus Mei - avatar
+ 1
dear agus, but I could have deleted the text I don't wanna display instead using value none! plz explain, m new to the world of coding.
21st Apr 2017, 11:22 PM
pavan pandya
pavan pandya - avatar