I have 3 divs with display:inline-block
. Each div set width to 30%, and height to 75%. The problem is that the width is bigger than the height and i want it to be the same (1:1). Can I solve it only by CSS?
#our_services {
height: 350px;
text-align: center;
font-family:"open_sans_hebrewregular", "alefregular", arial, "Times New Roman";
color: black;
background-color: rgb(224, 224, 224);
overflow: auto;
margin: auto;
}
#try {
background-color: rgb(224, 224, 224);
width:60%;
height:70%;
margin:auto;
}
#product1 {
width: 30%;
height: 75%;
position: relative;
background-color:green;
display:inline-block;
/* margin:5px; */
border: 0px;
}
#product2 {
width: 30%;
height: 75%;
background-color:orange;
display:inline-block;
/* margin:5px; */
border: 0px;
}
#product3 {
width: 30%;
height: 75%;
background-color:blue;
display:inline-block;
/* margin:5px; */
}
<div id="our_services" class="container">
<h1></h1>
<div id="try">
<div id="product1"></div>
<div id="product2"></div>
<div id="product3"></div>
</div>
</div>