so my problem is that I can not order elements that are cards in row. I want to put 3 cards in one row so that my page will look more lovely. In the presented code down from this text you can see that I am using divs for containers for the cards. Also I am using box-sizing: border-box, position: relative and display: inline-block. But for some reason the inline-block is not working and I do not know why... Have been stucked for a couple of days wondering how to do it and where I am doing something wrong with the inline-block.
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
.cards_container {
margin: 0 auto;
padding: 0 150px;
margin-top: 50px;
width: auto;
font-size: 0;
min-height: auto;
margin-left: auto;
margin-right: auto;
max-width: 2000px;
}
.card {
-webkit-box-sizing: border-box;
/* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box;
/* Firefox, other Gecko */
box-sizing: border-box;
/* Opera/IE 8+ */
position: relative;
display: inline-block;
background: white;
width: 30%;
height: auto;
margin: 0 1%;
margin-bottom: 2%;
border-radius: 10px;
border-style: solid;
border-color: rgb(90, 16, 141);
}
.card:hover {
cursor: pointer;
transform: scale(1.05);
transition: all 0.5s ease;
}
.card_image {
-webkit-box-sizing: border-box;
/* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box;
/* Firefox, other Gecko */
box-sizing: border-box;
/* Opera/IE 8+ */
height: 320px;
width: 100%;
object-fit: contain;
border-top-left-radius: 7px;
border-top-right-radius: 7px;
}
.card_title_p {
-webkit-box-sizing: border-box;
/* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box;
/* Firefox, other Gecko */
box-sizing: border-box;
/* Opera/IE 8+ */
padding: 0;
margin: 0;
text-align: center;
font-size: 19px;
padding: 10px;
padding-bottom: 0;
height: 32px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: context-menu;
}
.card_p {
-webkit-box-sizing: border-box;
/* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box;
/* Firefox, other Gecko */
box-sizing: border-box;
/* Opera/IE 8+ */
padding: 0;
margin: 0;
font-size: 16px;
padding: 10px;
height: 140px;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 7;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
cursor: context-menu;
}
.card_info {
-webkit-box-sizing: border-box;
/* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box;
/* Firefox, other Gecko */
box-sizing: border-box;
/* Opera/IE 8+ */
text-align: center;
font-size: 19px;
color: rgb(118, 16, 141);
padding: 7px;
margin: 10px;
background-color: rgb(238, 231, 243);
border-radius: 10px;
cursor: pointer;
}
.card_info:hover {
transition: 0.25s;
color: rgb(238, 231, 243);
background-color: rgb(118, 16, 141);
}
<div class="cards_container">
<div class="card">
<img src="siteimages/CS3W.jfif" class="card_image">
<p class="card_title_p"><b>HiKu (CS3W)</b></p>
<div class="card_p">Model: CS3W<br> Cell type: Mono-crystalline<br> Power range: 430~455 W<br> Max. system Voltage: 1400V<br> Connector type: T4 or H4 UTX or MC4-EVO2</div>
<div class="card_info" onclick="window.location.assign('ugabuga.html');">Learn more</div>
</div>
</div>