how to make a responsive box in css
.square {
width: 50%;
}
.square:after {
content: "";
display: block;
padding-bottom: 100%;
}
how to make a responsive box in css
.square {
width: 50%;
}
.square:after {
content: "";
display: block;
padding-bottom: 100%;
}
responsive square css
<!-- HTML -->
<div class='square-box'>
<div class='square-content'>
<h3>test</h3>
</div>
</div>
<!-- CSS -->
<style>
.square-box{
position: relative;
width: 50%;
overflow: hidden;
background: #4679BD;
}
.square-box:before{
content: "";
display: block;
padding-top: 100%;
}
.square-content{
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
color: white;
text-align: center;
}
</style>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us