Skip to content

Instantly share code, notes, and snippets.

@MichaelArestad
Created April 13, 2012 14:56
Show Gist options
  • Save MichaelArestad/2377439 to your computer and use it in GitHub Desktop.
Save MichaelArestad/2377439 to your computer and use it in GitHub Desktop.
The glass is half something
/* The glass is half something */
.glass {
position: relative;
border: 1px solid grey;
width: 200px;
height: 380px;
margin: 50px auto;
}
.glass > .water {
position: absolute;
top: 50%;
bottom: 0;
background: blue;
width: 100%;
}
<!-- content to be placed inside <body>…</body> -->
<div class="glass">
<div class="water">
</div>
</div>
{"view":"split-vertical","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment