Skip to content

Instantly share code, notes, and snippets.

@yhahn
Created November 26, 2012 20:01
Show Gist options
  • Save yhahn/4150275 to your computer and use it in GitHub Desktop.
Save yhahn/4150275 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<style>
.shaded:before {
content:'';
background:rgba(0,0,0,0.5);
position:fixed;
left:0px; right:0px; top:0px; bottom:0px;
}
.shaded > .modal {
background:#fff;
width:220px;
position:absolute; top:100px; left:50%; margin-left:-150px;
text-align:center;
padding:40px;
}
</style>
</head>
<body class='shaded'>
Foo bar baz
<div class='modal'>asdf<div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment