Design a Business Card - Design a Business Card

Tell us what’s happening:

“After the second hr element, there should be a div element with a class attribute with a value of social-media”.

I thought I had all my hr elements in place. Can someone spot the error?

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">
    <meta name="viewport" content="width=device-width,initial-scale=1.0"/>
</head>
<body>
<div class="business-card">
    <img class="profile-image" src="https://cdn.freecodecamp.org/curriculum/labs/flower.jpg" alt="Purple Cornflower">
    <p class="full-name">Simba B. Mahaja</p>
    <p class="designation">Web Design Developer</p>
    <p class="company">UX Developer</p>
    <hr>
    <p>mahajasimba@gmail.com</p>
    <p>07758620647</p>
    <a class="portfolio-link" href="SimbaMahaja@UXDeveloper001.onmicrosoft.com">Portfolio</a>
    <hr>
</div>
    <hr>
    
<div class="social-media">
    <h2>Connect with me</h2>
    <a href="@SimbaBMahaja">Twitter</a>
    <a href="Simba Mahaja">LinkedIn</a>
    <a href="SimbaBryn">GitHub</a>
</div>

</body>

</html>
/* file: styles.css */
body {
  background-color: rosybrown;
  font-family: Arial, sans-serif;
}

.business-card {
  width: 300px;
  background-color: skyblue;
  padding: 20px;
  margin-top: 100px;
  text-align: center;
  font-size: 16px;
  margin-left: auto;
  margin-right: auto;
}

.profile-image {
  max-width: 100%;
}

p {
  margin-top: 5px;
  margin-bottom: 5px;
}

.social-media {
  text-align: center;
}

.portfolio-link {
 text-decoration: none;
}

a {
  text-decoration: none;
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36

Challenge Information:

Design a Business Card - Design a Business Card

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/lab-business-card/6690e10ebe2181212abc9652.md at main · freeCodeCamp/freeCodeCamp · GitHub

Hi @SimbaBrynMahaja,

You should have a div with a class attribute with a value of business-card that will contain all the other elements.

This closing div tag is closing the .business-card div, which is supposed to contain all of the other elements…and you have an extra hr element.

Happy coding

According to instruction 11, there should be another div element with a ‘class’ attribute with a value of ‘social-media’, hence the second hr. However, after removing that ‘extra’ hr, the same error is still indicated.

Is your .social-media div nested inside the .business-card div as asked?

No. I did not come pass such an instruction. My understanding the two had separate div elements, and one after the second hr element. Which I did not grasp.

Here is the instruction again:

I stand corrected. And the challenge has been completed.

Thanks again