Skip to content

Instantly share code, notes, and snippets.

@cwylie0
Created November 2, 2016 21:02
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 cwylie0/f0bba723348f3af27ace0005943f794d to your computer and use it in GitHub Desktop.
Save cwylie0/f0bba723348f3af27ace0005943f794d to your computer and use it in GitHub Desktop.
<style>
.wrapper {
position: relative;
}
.buttons {
height: 150px;
background: tomato;
}
@media screen and (min-width: 48em) {
.wrapper:before {
content: '';
float: right;
display: block;
width: 300px;
height: 150px;
margin: 0 0 15px 15px;
}
.buttons {
position: absolute;
top: 0;
right: 0;
width: 300px;
}
}
</style>
<div class="wrapper">
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nostrum suscipit rem sit dignissimos nesciunt dolores distinctio. Totam ullam itaque possimus sapiente accusamus suscipit sint voluptatibus officiis distinctio pariatur perspiciatis iure.</p>
<div class="buttons">Buttons</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment