yaragallamurali Posted October 13, 2016 Share Posted October 13, 2016 hi. To hide an element i am setting display property to "none" and to display it again i am just removing "none" that means i am setting display property to ""(empty) using java script and my element get displayed so why should i use "block" then and what is the use of it? Link to comment Share on other sites More sharing options...
Ingolme Posted October 13, 2016 Share Posted October 13, 2016 When setting it to an empty value, you're telling it to use the value given to it by the stylesheet or if the stylesheet is empty, the browser's default value. You would need to specify "block" or "inline" if the stylesheet had it set to "none" by default. 1 Link to comment Share on other sites More sharing options...
yaragallamurali Posted October 13, 2016 Author Share Posted October 13, 2016 Nice. Thank u so much. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now