Design comparison
Solution retrospective
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
- @Islandstone89Posted 3 months ago
HTML:
-
Every webpage needs a
<main>
that wraps all of the content, except for<header>
andfooter>
. 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
ofpadding
on thebody
, 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
andjustify-content: center
on thebody
. -
Remove all widths in
px
. -
Add a
max-width
of around20rem
on the card, to prevent it from getting too wide on larger screens. -
line-height
andletter-spacing
should not be inpx
. Use%
for the line height andem
for the letter spacing, where1em
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
andmax-width: 100%
- the max-width prevents it from overflowing its container.
Marked as helpful2@PropowershellPosted 3 months ago@Islandstone89 Thank you very much Sir, this was really helpful. It really simplified the code.
1@PropowershellPosted 2 months ago@Islandstone89 Hi, please how do I host different webpages with one GitHub account like you did?
0@Islandstone89Posted 2 months ago@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 helpful1 -
- @MaskeyDudePosted 3 months ago
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 helpful2@PropowershellPosted 3 months ago@MaskeyDude Thank you very much, this was really helpful.
0@PropowershellPosted 2 months ago@MaskeyDude Hi, please how do I host different webpages with one GitHub account like you did?
1
Please log in to post a comment
Log in with GitHubJoin 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