Skip to content

Instantly share code, notes, and snippets.

@MoritzBuetzer
Created May 7, 2014 06:26
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MoritzBuetzer/4c89d9da1e15745cf2b0 to your computer and use it in GitHub Desktop.
Save MoritzBuetzer/4c89d9da1e15745cf2b0 to your computer and use it in GitHub Desktop.
figcaption restricted to the width of a responsive image
figure {
padding: 5px;
display: table;
}
figure img {
display: block;
}
figcaption {
display: table-caption;
caption-side: bottom;
}
@BradCoffield
Copy link

Perfecto :) Thanks.

@fabiodisconzi
Copy link

Really helpful! I apply it to Unify bootstrap theme.

@Porges
Copy link

Porges commented Sep 30, 2022

aah this is good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment