+ 1

display:none

isse kya fayda hai jab hame hide hi karna hai to likhenge hi nhi kyo ek baar likhe aur fir hide kare aur time waste kare

24th Mar 2019, 4:13 PM
Sachin Dubey
Sachin Dubey - avatar
6 Respuestas
+ 5
It's not waste because In some website it help to get the option "show more ","show less " Depending on where you use using id and other css part like Hover it useful stuff for etc......
24th Mar 2019, 6:34 PM
Yash🏁🔘
Yash🏁🔘 - avatar
+ 4
Mike You can't change an element's display property from none to visible or block it does not work. Sachin Dubey Uske istemal se website designer ek sign up form, email newsletter, ya popups(🙄) dekha sakte hai; Jab koi X mark par click kare toh woh element layout se nikala ja sakte hai.
25th Mar 2019, 3:47 AM
Lord Krishna
Lord Krishna - avatar
+ 4
Lord Krishna I do all the time. Display properties can be none, block, or inline, and javascript can be used to change them. https://www.w3schools.com/css/css_display_visibility.asp You can’t change it from none to visible. Visible is a visibility option. That link also shows the visibility option and tells you that both of the options are often used to show or hide elements. Available options are: display:none or block or inline visibility:hidden or visible https://www.w3schools.com/CSSref/pr_class_display.asp https://www.w3schools.com/cssref/pr_class_visibility.asp Please don’t say someones answer is wrong when it’s not.
25th Mar 2019, 12:40 PM
Mike
Mike - avatar
+ 4
I wasn’t personally offended. I know everyone makes mistakes. It’s just that this is a place to learn and your mistakes need to be corrected. 😀
25th Mar 2019, 1:56 PM
Mike
Mike - avatar
+ 3
Mike Hmm...you are right! I was testing with visible. I tried block but it was failing too, after refactoring the code, it worked fine. Thanks for linking the resource! Did i say your answer was wrong? I didn't say your answer was wrong or right. My personal experience and what i had searched led me to the conclusion it doesn't work. Didn't do it to attack you or something. If you knew something which i did not you can reply and correct me(like how you did now) Mistakes do happen all the time, it's learning from them that matters. No need to be so offended.
25th Mar 2019, 1:20 PM
Lord Krishna
Lord Krishna - avatar
+ 2
Like yash said, it’s for future options, like using javascript to switch display:none to display:block or display:inline by clicking on something, like view more details. I use display:none and visibility:hidden on many of my websites to allow pages to not be over populated, but allow more details to be available without having to show a whole new page.
24th Mar 2019, 7:53 PM
Mike
Mike - avatar