Tell us what’s happening:
I ran a rough draft and all the tests passed. I doctored up the code to make it more satisfactory and now test 2 doesn’t pass but the rest do. I can’t tell if there’s something missing.
- You should have at least three div elements with a class of card within your #playing-cards element.
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Playing Cards</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<main id="playing-cards">
<section class="spade">
<div class="card">
<div class="left">
<div>A</div>
<div>♠</div>
</div>
<div class="middle">
<div>♠</div>
</div>
<div class="right">
<div>A</div>
<div>♠</div>
</div>
</div>
</section>
<section class="diamond">
<div class="card">
<div class="left">
<div>A</div>
<div>♦</div>
</div>
<div class="middle">
<div>♦</div>
</div>
<div class="right">
<div>A</div>
<div>♦</div>
</div>
</div>
</section>
<section class="club">
<div class="card">
<div class="left">
<div>A</div>
<div>♣</div>
</div>
<div class="middle">
<div>♣</div>
</div>
<div class="right">
<div>A</div>
<div>♣</div>
</div>
</div>
</section>
<section class="heart">
<div class="card">
<div class="left">
<div>A</div>
<div>♥</div>
</div>
<div class="middle">
<div>♥</div>
</div>
<div class="right">
<div>A</div>
<div>♥</div>
</div>
</div>
</section>
<section class="spade">
<div class="card">
<div class="left">
<div>7</div>
<div>♠</div>
</div>
<div class="middle seven">
<div class="pip top">♠</div>
<div class="row">
<span>♠</span>
<span>♠</span>
</div>
<div class="pip center">♠</div>
<div class="row">
<span>♠</span>
<span>♠</span>
</div>
<div class="pip bottom">♠</div>
</div>
<div class="right">
<div>7</div>
<div>♠</div>
</div>
</section>
</main>
</body>
</html>
/* file: styles.css */
* {
box-sizing: border-box;
}
body {
background-color: rgba(29, 168, 223, 0.603)
}
#playing-cards {
display: flex;
justify-content: center;
gap: 20px;
flex-wrap: wrap;
}
.card {
width: 200px;
height: 400px;
display: flex;
border: 1px solid black;
padding: 5px;
border-radius: 5px;
background-color: #fff;
justify-content: space-between;
font-weight: bold;
font-family: timesnewroman;
font-size: 35px;
box-shadow: 4px 4px 10px black;
}
.left {
align-self: flex-start;
}
.middle {
align-self: center;
display: flex;
flex-direction: column;
}
.right {
align-self: flex-end;
transform: rotate(180deg)
}
.heart, .diamond {
color: rgb(255, 0, 0);
}
.seven {
display: flex;
flex-direction: column;
justify-content: space-between;
height: 50%;
width: 50%;
}
.row {
display: flex;
justify-content: space-between;
}
.pip {
text-align: center;
}
.bottom {
transform: rotate(180deg);
}
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Safari/605.1.15
Challenge Information:
Build a Page of Playing Cards - Build a Page of Playing Cards