I want To create Cards but The cards are coming one below another i dont what the problem exactly can u help me with it

HTML:

<div id="services">
    <div class="services-title-bg">
        <h2 class="services-title">Creative Expertise</h2>
    </div>
    <div class="service-subhead">
        <h2>Digital Service<br>I am Providing</h2>
    </div>

    <div class="cardBox">
        <div class="card">
           <div class="h4">Web Design</div>
         
          <div class="content">
            <div class="h3">How's it goin Fam ?</div>
            <p>This is Pradeep Saran, your tech mate!!! I love you all. Lets make this world a better place for all of us. Keep prospering...Keep learning!!!</p>
          </div>
        </div>
      </div>

      <div class="cardBox">
        <div class="card">
           <div class="h4">Web Design</div>
         
          <div class="content">
            <div class="h3">How's it goin Fam ?</div>
            <p>This is Pradeep Saran, your tech mate!!! I love you all. Lets make this world a better place for all of us. Keep prospering...Keep learning!!!</p>
          </div>
        </div>
      </div>

CSS:
#services{
width: 100%;
height: 100vh;
background-color: #1D1F25;
position: relative;
}
.services-title-bg{
width: 100%;
height: 100px;
background: #FCD401;
}
.services-title{
font-weight: 800;
font-size: 3.3333333333333335vw;
line-height: 4.0625vw;
justify-content: center;
position: absolute;
transform: translate(100%);
padding-top: 10px;
}
.service-subhead{
padding: 70px;
}
.service-subhead h2{
font-weight: 700;
font-size: 70px;
line-height: 85px;
letter-spacing: 0.03em;
color: #FFFFFF;
}

.cardBox {
width: 300px;
height: 350px;
position: relative;
display: grid;
place-items: center;
overflow: hidden;
border-radius: 20px;
box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 10px 0px,
rgba(0, 0, 0, 0.5) 0px 2px 25px 0px;
margin-left: 100px;
justify-content: space-between;

}

.card {
position: absolute;
width: 95%;
height: 95%;
background: #000814;
border-radius: 20px;
z-index: 5;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
text-align: center;
color: #ffffff;
overflow: hidden;
padding: 20px;
cursor: pointer;
box-shadow: rgba(0, 0, 0, 0.4) 0px 30px 60px -12px inset,
rgba(0, 0, 0, 0.5) 0px 18px 36px -18px inset;
display: flex;
flex-wrap: nowrap;
}

.card .h4 {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 20px;
font-weight: 800;
pointer-events: none;
opacity: .5;
}

.card .content .h3 {
font-size: 18px;
font-weight: 800;
margin-bottom: 10px;
}

.card .content p {
font-size: 14px;
line-height: 1.4em;
}

.card .content {
transform: translateY(100%);
opacity: 0;
transition: 0.3s ease-in-out;
}

.card:hover .content {
transform: translateY(0);
opacity: 1;
}

.card:hover .h4 {
opacity: 0;
}

.cardBox::before {
content: “”;
position: absolute;
width: 40%;
height: 150%;
background: #40E0D0;
background: -webkit-linear-gradient(to right, #FF0080, #FF8C00, #40E0D0);
background: linear-gradient(to right, #FF0080, #FF8C00, #40E0D0);
transform-origin: center;
animation: glowing_401 5s linear infinite;
}

@keyframes glowing_401 {
0% {
transform: rotate(0);
}

100% {
  transform: rotate(360deg);
}

}

Welcome to our community!

Wrap all your .cardbox elements in a new div element (I have put in the class attribute set to the value of “one”):

<div class="one">
    <div class="cardBox">
        <div class="card">
           <div class="h4">Web Design</div>
         
          <div class="content">
            <div class="h3">How's it goin Fam ?</div>
            <p>This is Pradeep Saran, your tech mate!!! I love you all. Lets make this world a better place for all of us. Keep prospering...Keep learning!!!</p>
          </div>
        </div>
      </div>

      <div class="cardBox">
        <div class="card">
           <div class="h4">Web Design</div>
         
          <div class="content">
            <div class="h3">How's it goin Fam ?</div>
            <p>This is Pradeep Saran, your tech mate!!! I love you all. Lets make this world a better place for all of us. Keep prospering...Keep learning!!!</p>
          </div>
        </div>
      </div>
  </div>

and then, add the display property set to flex for that class selector in css file:

.one {
  display: flex;
}

You should get something like this:

Now, you can tweak your code as you wish.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.