Peerfectionist
{♥}
Hiding an element in HTML/CSS
The simplest way to hide an element in HTML is to give it the [CSS] display: none. This however prevents the element form loading. If you need the element to remain usable the best solution is to make it invisible or position it off screen. This example does both.
Code

[CSS] .hidden { position: absolute; top: -9999px; left: -9999px; height: 0; width: 0; opacity: 0; }

Notes
For elements that don't need to serve any function, you can use [CSS] display: none and/or [CSS] visibility: hidden.
pending review
293 views
Posted 2015-01-01

Courtney {1}
4 snippets
Joined 2015-01-01
Hello! I'm from Toronto and programming is what I do. I've used C, PHP, C#, Java, JavaScript, and a few scripting and pseudo programming languages. Lately I've been learning the power of regex. I created Peerfectionist to be a user-centric code sharing site that promotes quality and pride in one's work. I will continue to work hard developing this site over the coming years.

Log in to comment!