Created
December 14, 2012 14:45
-
-
Save joholo/4285929 to your computer and use it in GitHub Desktop.
Hide empty divs - To hide the div set: display: none; in :empty selector
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Hide empty divs - To hide the div set: display: none; in :empty selector | |
*/ | |
div { | |
width: 100px; | |
border: 1px solid blue; | |
margin: 5px; | |
min-height: 10px; | |
} | |
div:empty { | |
/* To hide the div set: display: none; */ | |
border: 1px solid red; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- content to be placed inside <body>…</body> --> | |
<div>Content</div> | |
<div></div> | |
<div><span>span content</span></div> | |
<div><span></span></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment