I think I understand how to complete the challenge just fine. But on each challenge, I am also making sure that I understand what all of the pre-existing code means, and I am running into a few questions.
-
In the div tag around the hyperlinks, the class “cardLinks” is applied, but I don’t see that class defined anywhere in the code. Deleting class=“cardLinks” from the div tag doesn’t appear to do anything. Is this just extraneous code, or am I missing something?
-
There are two div tags nested within each other, one with the class “fullCard” and the other with the class “cardContent”. I’m wondering a couple of things about this:
a) Is there any reason not to just apply both classes to a single div tag and eliminate the second?
b) I don’t understand why the attributes of the class “cardContent” need to be separated out. Wouldn’t giving “fullCard” a bit more padding accomplish the same thing?
Here is the code as provided before completing the challenge. I’m not sure if there is a better way to include it than just copying and pasting… this is my first time using this forum!
h4 { } p { } .links { margin-right: 20px; } .fullCard { border: 1px solid #ccc; border-radius: 5px; margin: 10px 5px; padding: 4px; } .cardContent { padding: 10px; }<div class="cardText">
<h4>Google</h4>
<p>Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University.</p>
</div>
<div class="cardLinks">
<a href="https://en.wikipedia.org/wiki/Larry_Page" target="_blank" class="links">Larry Page</a>
<a href="https://en.wikipedia.org/wiki/Sergey_Brin" target="_blank" class="links">Sergey Brin</a>
</div>