Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

CSS Grid

P

@stefan-holmgren

Desktop design screenshot for the Social links profile coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are you most proud of, and what would you do differently next time?

It was quite straight forward.

What challenges did you encounter, and how did you overcome them?

Grid layout with margins to the edges of the browser took me for a loop, where I couldn't set the content's margin when it also was at a width: 100%.

I overcame them by adding padding to the container div instead.

What specific areas of your project would you like help with?

Not sure about my solution for having margins to the edges of the browser... There's probably a better way.

Community feedback

@dliferova

Posted

Hello,

Great job! I would suggest providing more detailed naming for classes. For example, if you have

h1 class="name"

try to choose names that reflect the entity. In this case, since you're assigning the class to a heading, using class="heading" would be more appropriate than "name".

Similarly, for <ul class="links",

a name like "social-links" would be more fitting (since these links are related in meaning).

Also, just because text on the page is the largest doesn't mean it should be h1. I recommend checking out this article

Marked as helpful

0

P

@stefan-holmgren

Posted

@dliferova

Thank you for your helpful comments!

Regarding the h1, I figured it's not about the size of the heading but rather the "semantic" property of it. A h1 should only exist once on a page, and that one would be what describes the content of the page, like they say in the article:

While using multiple <h1> elements on one page is allowed by the HTML standard (as long as they are not nested), this is not considered a best practice. A page should generally have a single <h1> element that describes the content of the page (similar to the document's <title> element).

0

@dliferova

Posted

@stefan-holmgren

H1 tags are an important part of SEO. Right now, you're kind of telling the browser that your site is "Jessica Randall", but on such a site, there can be anything - a portfolio, a creative blog, videos, etc. So, I would specialize that the site is Jessica Randall's personal page or something similar.

However, in the card, Jessica Randall it's just stylized text. It can be simple <p>Jessica Randall</p>

In such cases when h1 doesn't match the layout's largest text, I use a class for visually hiding h1, without breaking the logic and meaning (for SEO) of the headline

<h1 class="visually-hidden"> Jessica Randall frontend developer portfolio</>

.visually-hidden { position: absolute; clip: rect(1px, 1px, 1px, 1px); padding: 0; border: 0; height: 1px; width: 1px; overflow: hidden; }

I hope I explained it clearly =)

Marked as helpful

0
P

@stefan-holmgren

Posted

@dliferova

Superclear :) - and interesting solution regarding the visually-hidden class.

Thank you again

0
P

@Antonvasilache

Posted

Hello there!

Nice work with this one. Really like the way you've used grid to position the elements.

0

Please log in to post a comment

Log in with GitHub
Discord logo

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