Tell us what’s happening:
Design a business card
getting an error “there should be a div element with a class attribute with a value of social-media”
while my code is tottaly ok
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Business Card</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="business-card">
<img class="profile-image" src="https://cdn.freecodecamp.org/curriculum/labs/flower.jpg" alt="A beautiful rose">
<p class="full-name">Awad Ahmad</p>
<p class="designation">Developer</p>
<p class="company">Devsinc</p>
<hr> <!-- First hr -->
<p>Email Address: awadk251@gmail.com</p>
<p>Phone Number: 0323522145</p>
<a href="https://your-portfolio-link.com">Portfolio</a>
<hr> <!-- Second hr -->
</div> <!-- Closing the business-card div properly here -->
<!-- Immediately after second hr, open social-media div -->
<div class="social-media">
<h2>Connect with me</h2>
<a href="https://twitter.com">Twitter</a>
<a href="https://linkedin.com">LinkedIn</a>
<a href="https://github.com">GitHub</a>
</div>
</body>
</html>
/* file: styles.css */
/* Overall page styles */
body {
font-family: Arial, sans-serif;
background-color: rosybrown;
margin: 0;
padding: 0;
}
/* Paragraph styles */
p {
margin-top: 5px;
margin-bottom: 5px;
}
/* Link styles */
a {
text-decoration: none;
color: blue; /* optional, to make links visible */
}
a:hover {
text-decoration: underline;
}
/* Business card container */
.business-card {
width: 300px;
background-color: grey;
padding: 20px;
margin-top: 100px;
margin-left: auto;
margin-right: auto;
text-align: center;
font-size: 16px;
}
/* Profile image */
.profile-image {
max-width: 100%;
}
/* Social media container */
.social-media {
text-align: center;
margin-top: 30px;
}
.social-media a {
display: inline-block;
margin: 5px;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Challenge Information:
Design a Business Card - Design a Business Card