- Files
- Index
- Style
- Script
- README
- CDN Add
PLEASE WAIT...
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="style.css">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Product preview card component</title>
</head>
<body>
<!--
link de onde peguei o desafio:
https://www.frontendmentor.io/home
-->
<div class="left-dev">
<img src="image-product-desktop.jpg" alt="img">
</div>
<div class="right-dev">
<div class="content">
<h1>PERFUME</h1>
<H2>Gabrielle <br> Essence Eau <br> De Parfum</H2>
<p>A floral, solar and voluptuous <br>
interpretation composed by <br>
Oliver Polge, Perfumer-Creator <br>
for the House of CHANEL.</p>
<div class="price">
<p class="price1">
$149.99
</p>
<p class="price2">
$169.99
</p>
</div>
</div>
<div class="btn">
<button>
Add to Cart
</button>
</div>
</div>
</body>
</html>
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500&family=Raleway:wght@800&display=swap');
body{
background-color: hsl(30, 38%, 92%);
background-size: 1440px;
}
.left-dev{
padding-left: 10cm;
padding-top: 2cm;
}
/*Para o Border-radius funcionar em imagens
separe o padding da img
Link de onde aprendi:
https://stackoverflow.com/questions/71542490/why-border-radius-is-only-working-in-1-corner
*/
img {
width:300px;
height: 400px;
border-radius: 11px 0px 0px 11px;
}
.right-dev{
margin-left: 679px;
margin-top: -405px;
border-radius: 0px 11px 11px 0px;
width: 300px;
height: 400px;
background-color: #fff;
}
.content {
padding-left: 30px;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
}
h1 {
display: flex;
margin-top: 10px;
margin-left: 7px;
padding-top: 10px;
font-size: 11px;
font-weight: 500;
font-family: Montserrat;
color: hsl(228, 12%, 48%);
letter-spacing: 3px;
}
h2 {
display: flex;
margin-top: 7px;
padding-top: 3px;
padding-left: 4px;
font-family: Fraunces;
font-weight: 700;
font-size: 37px;
color: hsl(212, 21%, 14%);
}
p {
display: flex;
margin-top: -15px;
margin-left: 6px;
font-size: 14px;
color: hsl(228, 12%, 48%);
font-family: 'Montserrat';
}
.price{
display: flex;
margin-top: 13px;
margin-left: 6px;
}
.price1{
font-weight: 900;
font-size: 35px;
color: hsl(158, 36%, 37%);
font-family: 'Montserrat';
}
.price2 {
display: flex;
margin-top: -5px;
margin-left: 6px;
align-content: center;
flex-direction: row;
text-decoration: line-through;
}
.btn {
display: flex;
margin-top: -5px;
/* display: flex; */
/* margin-left: 32px; */
flex-direction: column;
align-content: center;
justify-content: center;
align-items: center;
flex-wrap: wrap;
}
button{
margin-top: -15px;
padding-top: 13px;
padding-left: 78px;
padding-right: 78px;
padding-bottom: 13px;
background-color: hsl(158, 36%, 37%);
border-radius: 5px;
border: none;
color: #fff;
font-weight: 700;
font-size: 16px;
font-family: Fraunces;
cursor: pointer;
}
/* ESLint rules https://eslint.org/docs/2.0.0/rules/ */
/* eslint no-undef: "off" */