Skip to content

Instantly share code, notes, and snippets.

@gunnarbittersmann
Last active August 29, 2015 14:19
Show Gist options
  • Select an option

  • Save gunnarbittersmann/624c1d7500e5132496a4 to your computer and use it in GitHub Desktop.

Select an option

Save gunnarbittersmann/624c1d7500e5132496a4 to your computer and use it in GitHub Desktop.
Flexbox: 7 pictures
/**
* Flexbox: 7 pictures
*/
figure
{
display: flex;
align-items: center;
margin: 0;
}
img:nth-child(1),
img:nth-child(7)
{
width: calc(100/1082 * 100%);
}
img:nth-child(2),
img:nth-child(6)
{
width: calc(132/1082 * 100%);
}
img:nth-child(3),
img:nth-child(5)
{
width: calc(184/1082 * 100%);
}
img:nth-child(4)
{
width: calc(250/1082 * 100%);
}
<figure>
<img src="http://placehold.it/100x100" alt=""/>
<img src="http://placehold.it/100x100" alt=""/>
<img src="http://placehold.it/100x100" alt=""/>
<img src="http://placehold.it/100x100" alt=""/>
<img src="http://placehold.it/100x100" alt=""/>
<img src="http://placehold.it/100x100" alt=""/>
<img src="http://placehold.it/100x100" alt=""/>
</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