Social links profile using HTML and CSS

Please log in to post a comment
Log in with GitHubCommunity feedback
- P@Islandstone89
Hey, good job!
To improve your solution even further, I would apply the following changes:
HTML:
-
A better alt text would be "Headshot of Jessica Randall".
-
Since this is a list of links, I would change
.card-links
from a<div>
to a<ul>
:
<ul class="card-links"> <li><a class="card-link" href="#">GitHub</a></li> <li><a class="card-link" href="#">Frontend Mentor</a></li> <li><a class="card-link" href="#">LinkedIn</a></li> <li><a class="card-link" href="#">Twitter</a></li> <li><a class="card-link" href="#">Instagram</a></li> </ul>
- Change
.attribution
to a<footer>
, and use<p>
for the text inside.
CSS:
-
Make a habit of including a modern CSS Reset at the top of the stylesheet.
-
I recommend adding a bit of
padding
, for example16px
, on thebody
, to ensure the card doesn't touch the edges on small screens. -
On the
body
, changeheight
tomin-height: 100svh
- this way, the content will not get cut off if it grows beneath the viewport. -
Add
gap: 2rem
on thebody
, to create some space between the<main>
and the<footer>
. -
Remove the properties on
.container
, they are not needed. -
Except for the profile image, remove all widths and heights in
px
. We rarely want to give a component a fixed size, as we need it to grow and shrink according to the screen size. -
We do want to limit the width of the card, so it doesn't get too wide on larger screens. To solve this issue, give the card a
max-width
of around20rem
. -
Add
padding: .75em 2em;
on the card links. -
font-size
must never be in px. This is a big accessibility issue, as it prevents the font size from scaling with the user's default setting in the browser. Use rem instead.
Marked as helpful -
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord