Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- img
- {
- outline: 0; max-width: 100%; height: 100%;
- }
- .box{
- position: relative;
- width: 30%;
- /* desired width */
- }
- .box:before{
- content: "";
- display: block;
- padding-top: 50%;
- }
- .content{
- position: absolute;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement