Responsive Summary Page using HTML5, CSS3 and Bootstrap
Design comparison
Solution retrospective
- I learnt the usage of gradient.
- Understood the bootstrap layout.
- Understood the responsive feature using media query
- understanding the breakpoints
The layout needs to be verified.
Community feedback
- @SvitlanaSuslenkovaPosted 2 months ago<body>
delete<main class="container-md container-sm offset-md-3 ml-sm-auto"> - no need <main class="row result-summary"> div becomes main <article class="result col-md-4 p-4"> <section class="result-heading col-md-12 fw-bold text-center"> Your Result </section> <section class="score"> <span class="user-score">76</span> <span class="out-of-score">of 100</span> </section> <section class="remark"> <p class="remark_heading">Great</p> <p class="remark_sub-heading"> You scored higher than 65% of the people who have taken these tests. </p> </section> </article>
Marked as helpful1 - @TedJenklerPosted 2 months ago
Hi @anubhab5,
Nice project! Here are a few suggestions for improvement:
Centering the Content: I noticed that your project isn't centered. You have two main options for centering your content:
Apply display: flex to the parent container and use align-items: center and justify-content: center. This is the recommended approach if you don't need overlapping designs.
Alternatively, you can use absolute positioning: set the component to position: absolute, then use top: 50%, left: 50%, and transform: translate(-50%, -50%) to center it.
Minimize Use of <div> Elements: While <div> elements can be useful, it's better to use semantic HTML elements when possible. They improve accessibility and make your code easier to inspect and understand. Use <div> only when necessary and try to layout your content using Flexbox or positioning first. This will help screen readers navigate your site more effectively.
Keep up the great work!
Best, Teodor
Marked as helpful1@anubhab5Posted 2 months agoThanks @TedJenkler for your views. Yes I missed the centering part. For the second comment (the usage of div tag) I did not use a single div tag in the entire project :P https://github.com/anubhab5/result-summary/blob/master/index.html May be you can help me by providing a repo link which I can follow to grow my semantic element knowledge. Thanks in advance.
1 - @SvitlanaSuslenkovaPosted 2 months ago<section class="row result-summary"> <section class="result col-md-4 p-4"> <section class="result-heading col-md-12 fw-bold text-center"> Sections are used as siblings, not parent-child, don't be afraid to use div. Also, I think you forgot to center project for desktop.Marked as helpful1@anubhab5Posted 2 months ago
@SvitlanaSuslenkova Thanks a lot for your useful thought. I have few more questions. Can we connect over discord if that is okay for you?
0@anubhab5Posted 2 months agohello @SvitlanaSuslenkova how and what all semantic elements I could have used instead of just using section throughout. Wanted to know your thoughts on the same! Thank you
0
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