Skip to content

Instantly share code, notes, and snippets.

@vasilisvg
Created May 13, 2014 20:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vasilisvg/7cfed7dd56c842e749be to your computer and use it in GitHub Desktop.
Save vasilisvg/7cfed7dd56c842e749be to your computer and use it in GitHub Desktop.
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
figure {
position: relative;
display: table; /* geloof ik, niet getest */
width: 1em; /* geloof ik */
}
figure img {
display: block;
}
figcaption {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: hsla(0,0%,100%,.5);
}
<!-- content to be placed inside <body>…</body> -->
<figure>
<img src="http://vasilis.nl/voto/fotos/klein/140513113639-een-minuut-te-laat-500.jpg" alt="">
<figcaption>Dit moet over dat plaatje heen staan en het maakt helemaal niet uit hoe lang en hoog die tekst is</figcaption>
</figure>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment