Easiest way to get the words ordered the same

Viewed 41

the design image

the image that needs work

<body>
  <main>
    <div class="card-container">
      <div class="image-container">
        <img src="images\image-product-desktop.jpg" alt="product-image">
      </div>
      <div class="text-container">
        <h3>perfume</h3>

        <h1 class="heading">Gabrielle Essence Eau De Parfum</h1>

        <p class="body">A floral, solar and voluptuous interpretation composed by Olivier Polge,
          Perfumer-Creator for the House of CHANEL.</p>
        <p class="price1">$149.99<span>$169.99</span></p>
        <div class="button">
          <button type="button" name="button"><img src="images\icon-cart.svg" alt="cart-icon">Add to Cart</button>
        </div>
      </div>
    </div>
  </main>

*{
  box-sizing: border-box;
}
body{
  background-color: hsl(30, 38%, 92%);
}
.card-container{
  display: flex;
  justify-content: center;
  align-content: center;
  margin-top: 200px;
}
h1{
  font-family:Fraunces ;
  font-weight: 700;
  max-width: 350px;
  line-height: 30px;
}
.text-container{
  background-color: white;
  padding: 30px;
  border-radius: 1px 15px 15px 1px;
  height: 900px;
  text-align: justify;
}
img{
  border-radius: 15px 1px 1px 15px;
}
button{
  background-color: hsl(158, 36%, 37%);
  border-radius: 5px 5px 5px 5px;
  border: none;
  color: white;
  text-align: center;
  padding-top:20px;
  padding-bottom: 20px;
  padding-left:150px;
  padding-right:150px;
  margin-top: 550px;

}
span.price1{
color: hsl(158, 36%, 37%);
font-weight: 500;
}
span.price2{
  text-decoration: line-through;
  color: hsl(228, 12%, 48%);
}
p.body{
  color: hsl(228, 12%, 48%);
  letter-spacing: 4px;
}
h3{
  color:  hsl(228, 12%, 48%);
  text-transform: uppercase;
  letter-spacing: 4px;
  font-family: Fraunces;
}

So i'm trying to build this card using HTML and CSS and I can't seem to get the wording to be in the order of the original. I have tried flex box method as well as other various methods such as as using margin, line breaks and padding as well as letter-spacing to get it looking similar. I hope I was able to convey the issue I am having.

1 Answers

the margin and padding should be enough to set the border like in the picture, maybe you put it not in the right place. it would be nice to be able to include the code so that you can better understand the real problem

Related