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

Responsive-ish Social Profile Links

P
Maisha Mirā€¢ 130

@maishamir

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


Hey everyone! I'm currently working on making my designs more responsive (haven't touched media queries or mobile design yet, but working towards it!) Not entirely sure if the way I'm doing it currently with the specific percentages is the way to go, but any pointers would be wonderful :D

Note: I designed this on a 13-inch MacBook pro and it looks significantly different to the screenshot. Any tips for making it more exact to the given screenshot would be great!

Community feedback

Daniel šŸ›øā€¢ 37,290

@danielmrz-dev

Posted

Hello @maishamir!

Your solution looks great!

I have a suggestion for improvement:

  • Use <main> to wrap the main content instead of <div>.

šŸ“Œ Think of <div> and <span> in HTML like plain boxes or placeholders. They're handy for holding content, but they don't tell us anything about what's inside or what it's meant for on the webpage.

This tag change does not impact your project visually and makes your HTML code more semantic, improving SEO optimization as well as the accessibility of your project.

I hope it helps!

Other than that, great job!

Marked as helpful

1

P
Maisha Mirā€¢ 130

@maishamir

Posted

Thanks so much @danielmrz-dev! That's an awesome way to explain the difference between main and divs :D

1
P
tedikoā€¢ 6,580

@tediko

Posted

Hi @maishamir!

  • "Making a site responsive" does not mean that every site / component needs a media query. Social links profile is the perfect challenge to create responsive component without using media queries.
  • I think you need to go back and spent more time learning HTML. Your document lacks landmarks, lists, anchors and have multiple heading elements that are unnecessary. Landmarks are a group of HTML tags and roles that define different subsections of a website and help navigate through a website. Your .card container should be <main> element, .links container could be a <ul> list and <p class="socials"> elements should be <a> anchors. Then keep your <h1> heading as it is your component title, but change <h2> element to <p>.
  • For your image provide more descriptive alt attribute for the non-sighted users.
  • Block elements (like html , body , div , p ) have width 100% automatically so width is not required for body element, remove that property from your css rules.
  • Change body to take min-height: 100vh. 100vh means that the initial body height will take 100% of the viewport height, whereas the use of min-height instead of height will let the body element grow even more if necessary.
  • You shouldn't set height on your container. Your content should tell container how tall it can grow itself.
  • You shouldn't use percentages to set dimensions of your container. % is relative to its parental container, which in your solution is body element. That mean when your .card have width: 28% and I open your website on mobile (e.g 375px wide), your .card component will have width of 100px only, which is not readable nor responsive. Instead use max-width: 390px (or rems if you read about them) and width: 100% so it will respect your parent container width, but never grow more than 390px. It will instantly make your container responsive without media-queries. The same applies for your margins/paddings. Use px or rem values.
  • For your image use explicit width and height values like 100px. Have fun!

Marked as helpful

1

P
Maisha Mirā€¢ 130

@maishamir

Posted

@tediko

Wow thanks so much for the awesome feedback! Incredibly concrete and constructive :D There was an oversight in using the right tags ( not sure how I missed that šŸ˜…). But this one was a little strange as the body didn't take up the whole width right off the bat as it usually does, so I had to set the width explicitly (never happened before this challenge). But everything else you said will be taken into consideration in future challenges :)

1

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