Skip to content

Instantly share code, notes, and snippets.

@felixzapata
Created September 24, 2012 11:15
Show Gist options
  • Save felixzapata/3775502 to your computer and use it in GitHub Desktop.
Save felixzapata/3775502 to your computer and use it in GitHub Desktop.
How can I make the width of my <figcaption> match the width of the <img> inside its <figure> tag?
/*
* http://stackoverflow.com/questions/6534473/how-can-i-make-the-width-of-my-figcaption-match-the-width-of-the-img-inside
*/
figure { display: table; }
figcaption { display: table-caption; caption-side: bottom ; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment