I am currently working on building an E-commerce website to gain some practice. Here is how the div is set up:
.small-container {
max-width: 1080px;
margin: 5px;
padding-left: 25px;
padding-right: 25px;
}
.col-4 {
flex-basis: 25%;
padding: 10px;
min-width: 200px;
margin-bottom: 50px;
background-color: #87bdd8!important;
border-style: solid;
border-color: #1E90FF;
}
.col-4 img {
width: 100%;
border-style: solid;
}
<div class="small-container">
<h2>Merch by Elute FLP</h2>
<div class="row">
<div class='col-4">
<img src="Pictures/JeansandTee.jpg">
<h5>Black Graphic T-Shirt</h5>
<p class="price">$29.99</p>
<p>Black Shirt w Graphic 100% cotton</p>
<p><button>Add to Cart</button></p>
</div>
<div class="col-4">
<img src="Pictures/JeansandTee.jpg">
<h5>Black Graphic T-Shirt</h5>
<p class="price">$29.99</p>
<p>Black Shirt w Graphic 100% cotton</p>
<p><button>Add to Cart</button></p>
</div>
<div class="col-4">
<img src="Pictures/JeansandTee.jpg">
<h5>Black Graphic T-Shirt</h5>
<p class="price">$29.99</p>
<p>Black Shirt w Graphic 100% cotton</p>
<p><button>Add to Cart</button></p>
</div>
</div>
As I'm new to coding and still learning, please excuse any mistakes in my code or question. I prefer figuring things out on my own rather than relying solely on tutorials. However, I can't seem to solve this issue myself. My intention is for the divs to have space without wrapping when I add margins.
Currently using Atom Framework and facing a problem where elements are displayed vertically when running the code here, but they appear horizontally when loaded in Atom. Any idea why this might be happening?