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

Flexbox and CSS Box Model

@Propowershell

Desktop design screenshot for the QR code component 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?

I like the fact that I was able to follow along with the process outlined by Frontend Mentor and I would use the same process next time.

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

The major challenge I encountered was deploying the page to GitHub pages. Then a lesser challenge was trying to align the QR code with the text beneath it, since I hadn't decided which CSS positioning technologies to use.

After reading about Git on www.git-scm.com and GitHub documentations I was able to figure out a way to deploy the project successfully.

And I overcame the issue of positioning by reading articles about CSS positioning on MDN and CSS tricks while using my best judgement for the styles.

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

How to properly push projects from Visual Studio Code to GitHub.

Community feedback

@MaskeyDude

Posted

It's pretty simple!

[First make sure you are signed in to your github from vscode settings]

  • Open your folder in vs code
  • On your left (where the explorer, search, and extensions buttons are) there will be a git button. Click it!
  • You will have an option saying "Initialize Repository" and "Publish to GitHub"
  • Click Initialize Repository
  • You will get a button saying "Commit" with a tick
  • After clicking a page will open to name your "Commit" (commit are the changes you make this page will come up whenever you make new changes)
  • Name it then a button will appear "Publish Branch"
  • After clicking you'll have the option to name your rep with 2 options: Public or Private Repository
  • Name & Choose your option
  • Done!

You can keep coding in those files and to upload your new code just click git then "commit" and done!

Marked as helpful

2

@Propowershell

Posted

@MaskeyDude Thank you very much, this was really helpful.

0

@Propowershell

Posted

@MaskeyDude Hi, please how do I host different webpages with one GitHub account like you did?

0
P

@Islandstone89

Posted

HTML:

  • Every webpage needs a <main> that wraps all of the content, except for <header> and footer>. This is vital for accessibility, as it helps screen readers identify a page's "main" section. Wrap the card in a <main>.

  • Besides for the card, you don't need any divs in this challenge, so I would simplify your HTML structure to this:

<main>
    <div>
       <img>
       <h2></h2>
       <p></p>
    </div>
</main>
  • The alt text must also say where it leads(the frontendmentor website). A good alt text would be "QR code leading to the Frontend Mentor website."

  • Headings should always be in order, so you never start with a <h3>. I would change the heading to a <h2> - a page should only have one <h1>, reserved for the main heading. As this is a card heading, it would likely not be the main heading on a page with several components.

CSS:

  • Use the style guide to find the correct background-color.

  • Remember to specify a fallback font:font-family: 'Outfit', sans-serif;.

  • I like to add 1rem of padding on the body, to ensure the card doesn't touch the edges on small screens.

  • Remove the margin on the card.

  • To center the card vertically, add min-height: 100svh and justify-content: center on the body.

  • Remove all widths in px.

  • Add a max-width of around 20rem on the card, to prevent it from getting too wide on larger screens.

  • line-height and letter-spacing should not be in px. Use % for the line height and em for the letter spacing, where 1em equals the font size of the element.

  • Paragraphs have a default value of font-weight: 400, so there is no need to declare it.

  • On the image, add display: block and max-width: 100% - the max-width prevents it from overflowing its container.

Marked as helpful

1

@Propowershell

Posted

@Islandstone89 Thank you very much Sir, this was really helpful. It really simplified the code.

1

@Propowershell

Posted

@Islandstone89 Hi, please how do I host different webpages with one GitHub account like you did?

0
P

@Islandstone89

Posted

@Propowershell create a repository for each of your projects. After you have created a repo, go to Settings, then Pages,. Where it says "Branch", select "Main" as the branch and "root" as the folder, and click "Save".

Go back to the repository overview, and click the cog wheel in the "About" section. Under "Website", make sure "Use your GitHub Pages website" is checked, and save the changes.

Marked as helpful

1

@Propowershell

Posted

@Islandstone89 Thank you very much.

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