Skip to content

Instantly share code, notes, and snippets.

@lucasdidthis
Last active January 11, 2017 15:38
Show Gist options
  • Save lucasdidthis/390647dc0995fa492bc906a46dc3fa48 to your computer and use it in GitHub Desktop.
Save lucasdidthis/390647dc0995fa492bc906a46dc3fa48 to your computer and use it in GitHub Desktop.
Prevent Content-Shifting in Contao with automated proportion-calc (CSS)
figure > span:first-child{
width: 100%;
display: block;
top: 0;
left: 0;
position: relative;
}
figure > span:first-child + img{
width: 100%;
height: auto;
display: block;
top: 0;
left: 0;
position: absolute;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment