Created
February 26, 2014 12:40
-
-
Save anonymous/9228804 to your computer and use it in GitHub Desktop.
Responsive Lightbox
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
/** | |
* Responsive Lightbox | |
*/ | |
font-family: Arial, helvetica, sans-serif; | |
background: #fff; | |
min-height: 100%; | |
.lightbox { | |
display: block; | |
position: fixed; | |
margin: auto; | |
width: 300px; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
left: 0; | |
} | |
.lightbox .container-h { | |
display: table; | |
width: 100%; | |
height: 100%; | |
} | |
.lightbox .container-v { | |
width: 100%; | |
vertical-align: middle; | |
display: table-cell; | |
} | |
.lightbox .container { | |
display: block; | |
border-radius: 0.5em; | |
border: 0.1em solid #CCC; | |
background: #eee; | |
padding: 1em; | |
position: relative; | |
min-height: 200px; | |
} | |
.lightbox header h1 { | |
font-size: 1.2em; | |
margin: 0 0 0.5em 0; | |
} |
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
<div class="lightbox"> | |
<div class="container-h"> | |
<div class="container-v"><div class="container"><header> | |
<h1>Lightbox title</h1> | |
</header> | |
<div class="content"> | |
Lightbox content. | |
</div> | |
</div></div> | |
</div> | |
</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":"html"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment