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

Qr code card featuring Responsivnes and flexbox

SIDAโ€ข 190

@GSida015

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?

It was really easy for me,its not first time I do this.

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

It was really easy idk.

Community feedback

@saularanguren

Posted

Greetings, your solution is really impressive, however, I am going to help you with some tips so you can improve your web layout skills.

Start by eliminating code blocks (grouped lines) that are unnecessary in your project:

<!-- displays site properly based on user's device -->
<!-- Feel free to remove these styles or customise in your own stylesheet ๐Ÿ‘ -->

<!-- Improve your front-end skills by building projects

  Scan the QR code to visit Frontend Mentor and take your coding skills to the next level
  
<div class="attribution">
    Challenge by <a href="https://www.frontendmentor.io?ref=challenge" target="_blank">Frontend Mentor</a>. 
    Coded by <a href="#">Your Name Here</a>.
</div> -->

These lines of code, including the comments, are not playing any role.

Let's continue with improving your semantic html, replace the <div class="qr-code-container"></div> tag with the <main class="qr-code-container"></main> tag and replace the <div class="text-cont"></div> tag with <section class="text-cont"></section>, this is how your project should look:

<main class="qr-code-container">
    <img src="images/image-qr-code.png" alt="" class="qr-img">
    <section class="text-cont">
        <h3>Improve your front-end skills by building projects</h3>
        <p>Scan the QR code to visit Frontend Mentor and take your coding skills to the next level</p>
    </section>
</main>

Finally, you must eliminate the <div class="wrapper"> tag and the last </div>, it should not be equieta, that is what body is for because this will be as its name says the main body of your page, and don't forget to change the .wrapper class in the css to body, eliminate the width: 100%; css rule, it is not necessary and modify the height: 100vh; rule to min-height : 100vh;, by saying min-height you are telling the browser: it does not matter if my website is much longer than the user's screen, it will not be limited, otherwise it will be limited and will not let you scroll if the page is longer

body {
    min-height: 100vh;
    background-color: hsl(212, 45%, 89%);
    display: flex;
    align-items: center;
    justify-content: center;
}

happy codign ๐Ÿ˜

Marked as helpful

1

SIDAโ€ข 190

@GSida015

Posted

@saularanguren thank you for your feedback,I appreciate it and will consider your advice in my future projects!๐Ÿ’ช๐Ÿป๐Ÿ˜‰

1
P
DalaScriptโ€ข 380

@DalaScript

Posted

Hey, Good job!

แƒ™แƒแƒ แƒ’แƒ˜ แƒœแƒแƒ›แƒฃแƒจแƒ”แƒ•แƒแƒ แƒ˜แƒ แƒ›แƒแƒ›แƒ”แƒฌแƒแƒœแƒ, แƒแƒกแƒ”แƒ•แƒ” แƒซแƒแƒšแƒ˜แƒแƒœ แƒ›แƒแƒ›แƒ”แƒฌแƒแƒœแƒ Github-แƒ–แƒ” แƒ’แƒแƒคแƒแƒ แƒ›แƒ”แƒ‘แƒ. แƒ’แƒแƒฃแƒ›แƒฏแƒแƒ‘แƒ”แƒกแƒ”แƒ‘แƒ˜แƒกแƒ—แƒ•แƒ˜แƒก แƒ›แƒแƒ’แƒชแƒ”แƒ› แƒ แƒแƒ›แƒ“แƒ”แƒœแƒ˜แƒ›แƒ” แƒ แƒฉแƒ”แƒ•แƒแƒก :

1. HTML แƒคแƒแƒ˜แƒšแƒจแƒ˜, head แƒ—แƒ”แƒ’แƒจแƒ˜ style-แƒ˜แƒก แƒ”แƒšแƒ”แƒ›แƒ”แƒœแƒขแƒ˜ แƒแƒฆแƒแƒ  แƒ’แƒญแƒ˜แƒ แƒ“แƒ”แƒ‘แƒ, แƒ˜แƒก แƒ—แƒ•แƒ˜แƒกแƒ”แƒ‘แƒ”แƒ‘แƒ˜ แƒ แƒ แƒแƒ แƒ˜แƒก style-แƒ˜แƒก แƒ—แƒ”แƒ’แƒจแƒ˜ แƒแƒ แƒ˜แƒก attribution แƒ™แƒแƒœแƒขแƒ”แƒ˜แƒœแƒ”แƒ แƒ˜แƒกแƒ—แƒ•แƒ˜แƒก, แƒ แƒแƒ›แƒ”แƒšแƒ˜แƒช แƒ—แƒ”แƒ›แƒšแƒ”แƒ˜แƒ—แƒก แƒ›แƒแƒงแƒ•แƒ”แƒ‘แƒ แƒ˜แƒ“แƒ”แƒแƒจแƒ˜, แƒ›แƒแƒ’แƒ แƒแƒ› แƒ”แƒก แƒฌแƒแƒจแƒšแƒ˜แƒšแƒ˜ แƒ’แƒแƒฅแƒ•แƒก แƒ“แƒ แƒจแƒ”แƒกแƒแƒ‘แƒแƒ›แƒ˜แƒกแƒแƒ“ style แƒ—แƒ”แƒ’แƒ˜ แƒแƒฆแƒแƒ  แƒแƒ แƒ˜แƒก แƒกแƒแƒญแƒ˜แƒ แƒ.

2. Font-แƒ˜แƒก แƒ“แƒแƒšแƒ˜แƒœแƒ™แƒ•แƒ แƒ“แƒแƒ’แƒแƒ•แƒ˜แƒฌแƒงแƒ“แƒ, 'outfit'-แƒ˜แƒก แƒคแƒแƒœแƒขแƒ˜แƒ แƒ“แƒ แƒจแƒ”แƒ’แƒ˜แƒซแƒšแƒ˜แƒ แƒแƒ› แƒšแƒ˜แƒœแƒ™แƒ–แƒ” แƒœแƒแƒฎแƒ.

3. แƒ’แƒแƒ›แƒแƒ˜แƒงแƒ”แƒœแƒ” แƒ˜แƒกแƒ”แƒ—แƒ˜ แƒ”แƒšแƒ”แƒ›แƒœแƒขแƒ”แƒ‘แƒ˜, แƒ แƒแƒ›แƒ”แƒšแƒ˜แƒช แƒแƒ แƒ˜แƒก แƒกแƒ”แƒ›แƒแƒœแƒขแƒ˜แƒ™แƒฃแƒ แƒแƒ“ แƒ’แƒแƒ›แƒแƒ แƒ—แƒšแƒ”แƒ‘แƒฃแƒšแƒ˜, แƒ แƒแƒ’แƒแƒ แƒ˜แƒช แƒแƒ แƒ˜แƒก main แƒ—แƒ”แƒ’แƒ˜ แƒ›แƒแƒ’แƒแƒšแƒ˜แƒ—แƒแƒ“, div แƒ™แƒแƒœแƒขแƒ”แƒ˜แƒœแƒ”แƒ แƒ˜ แƒ แƒแƒ›แƒ”แƒšแƒกแƒแƒช แƒแƒฅแƒ•แƒก wrapper-แƒ˜แƒก แƒ™แƒšแƒแƒกแƒ˜, แƒ›แƒ˜แƒก แƒ›แƒแƒ’แƒ˜แƒ•แƒ แƒแƒ“ แƒจแƒ”แƒ’แƒ˜แƒซแƒšแƒ˜แƒ แƒ’แƒแƒ›แƒแƒ˜แƒงแƒ”แƒœแƒ main แƒ—แƒ”แƒ’แƒ˜, แƒ“แƒ div แƒ™แƒแƒœแƒขแƒ”แƒ˜แƒœแƒ”แƒ แƒ˜ แƒ แƒแƒ›แƒ”แƒšแƒกแƒแƒช แƒแƒฅแƒ•แƒก qr-code-container แƒ™แƒšแƒแƒกแƒ˜, แƒ›แƒ˜แƒก แƒ›แƒแƒ’แƒ˜แƒ•แƒ แƒแƒ“ แƒจแƒ”แƒ’แƒ˜แƒซแƒšแƒ˜แƒ แƒ’แƒแƒ›แƒแƒ˜แƒงแƒ”แƒœแƒ article แƒ—แƒ”แƒ’แƒ˜.

4. แƒแƒกแƒ”แƒ•แƒ” แƒ›แƒ”แƒขแƒ˜ แƒงแƒฃแƒ แƒแƒ“แƒฆแƒ”แƒ‘แƒ แƒ›แƒ˜แƒแƒฅแƒชแƒ˜แƒ” แƒ“แƒ”แƒขแƒแƒšแƒ”แƒ‘แƒก, qr-code-แƒ˜แƒก แƒคแƒแƒขแƒแƒก border-radius-แƒ–แƒ” แƒ›แƒ”แƒขแƒ˜ แƒ’แƒแƒฅแƒ•แƒก แƒ›แƒ˜แƒ—แƒ˜แƒ—แƒ”แƒ‘แƒฃแƒšแƒ˜ แƒ•แƒ˜แƒ“แƒ แƒ” แƒฃแƒœแƒ“แƒ แƒ˜แƒงแƒแƒก.

5. text-cont แƒ™แƒšแƒแƒกแƒ˜แƒก p แƒ”แƒšแƒ”แƒ›แƒ”แƒœแƒขแƒก แƒแƒ  แƒแƒฅแƒ•แƒก text-shadow แƒ—แƒ•แƒ˜แƒกแƒ”แƒ‘แƒ.

6. qr-card-แƒก แƒฌแƒแƒฃแƒจแƒแƒšแƒ” height-แƒ˜แƒก แƒ—แƒ•แƒ˜แƒกแƒ”แƒ‘แƒ, แƒ แƒแƒ› แƒ–แƒแƒ›แƒ˜ แƒ“แƒแƒ”แƒ›แƒ—แƒฎแƒ•แƒ”แƒก.

7. แƒ—แƒฃ แƒแƒ  แƒ’แƒแƒฅแƒ•แƒก แƒžแƒ แƒ”แƒ›แƒ˜แƒฃแƒ›แƒ˜ แƒœแƒแƒงแƒ˜แƒ“แƒ˜ Fronendmentor-แƒ–แƒ”, แƒ›แƒแƒจแƒ˜แƒœ แƒ’แƒ˜แƒ แƒฉแƒ”แƒ• แƒ แƒแƒ›, แƒ แƒแƒชแƒ แƒชแƒ•แƒšแƒ˜แƒšแƒ”แƒ‘แƒ”แƒ‘แƒก แƒจแƒ”แƒ˜แƒขแƒแƒœ แƒจแƒ”แƒœ แƒžแƒ แƒแƒ”แƒฅแƒขแƒจแƒ˜, แƒแƒฎแƒแƒšแƒแƒ“ แƒแƒขแƒ•แƒ˜แƒ แƒ—แƒ, แƒ“แƒ แƒแƒ  แƒ’แƒแƒฃแƒ™แƒ”แƒ—แƒ แƒกแƒฅแƒ แƒ˜แƒœแƒจแƒแƒ—แƒ˜แƒก แƒแƒฎแƒแƒšแƒ˜ แƒ’แƒ”แƒœแƒ”แƒ แƒ˜แƒ แƒ”แƒ‘แƒ, แƒ˜แƒ›แƒ˜แƒขแƒแƒ› แƒ แƒแƒ› แƒจแƒ”แƒ–แƒฆแƒฃแƒ“แƒฃแƒšแƒ˜ แƒฎแƒแƒ  แƒแƒฎแƒแƒšแƒ˜ แƒกแƒฅแƒ แƒ˜แƒœแƒจแƒแƒ—แƒ”แƒ‘แƒ˜แƒก แƒ’แƒ”แƒœแƒ”แƒ แƒ˜แƒ แƒ”แƒ‘แƒแƒจแƒ˜.

แƒฌแƒแƒ แƒ›แƒแƒขแƒ”แƒ‘แƒ”แƒ‘แƒ˜!

Marked as helpful

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>.

  • The image has meaning, so it must have proper alt text. Write something short and descriptive, without including words like "image" or "photo". Screen readers start announcing images with "image", so an alt text of "image of qr code" would be read like this: "image, image of qr code". The alt text must also say where it leads(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>. Change it into a <h2>.

CSS:

  • Including a CSS Reset at the top is good practice.

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

  • font-family should be placed on the body.

  • I would move the properties on .wrapper to the body .As mentioned above, you don't need the width ,and height must be min-height.

  • Remove ALL widths and heights in px. Setting fixed sizes is not recommended for the web, as we want our content to adapt to different screens.

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

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

  • Since all of the text should be centered, you only need to set text-align: center on the body, and remove it elsewhere. The children will inherit the value.

  • I would remove the text-shadow, as it makes the text harder to read.

  • You don't need to declare font-style: normal, as that is the default.

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

  • As the design doesn't change, there is no need for any media queries. When you do need them, they should be in rem, not px. Also, it is common practice to do mobile styles first and use media queries for larger screens.

Marked as helpful

0

SIDAโ€ข 190

@GSida015

Posted

@Islandstone89 Thank you for your feedback,I will consider it...IDK if I will or not change this project but I will consider your advice in my future projects!!!๐Ÿ™‚

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