Design comparison
Solution retrospective
This one took me a long time to do (Approx. 4hrs). I'm a newbie when it comes to coding. I'm currently taking a Full Stack Bootcamp Course through Udemy taught by Dr. Angela Yu. I currently just finished the Bootstrap section from that course.
I did not look at any solutions for this challenge. I just work through with what I know so far to make it look like what it should. I have not tested this on mobile so I'm not sure if this code will work.
I guess any advice on workflow on how to tackle this challenge from start to end would be amazing. I found myself all over the place mid way to completing this challenge.
Thank you so much for your help.
Community feedback
- @zenab12Posted over 2 years ago
Hey odyg You did amazing work congratulations for completing this challenge
to fix accessibility issues :
-
You should use
<main class="container">
and wrap inside it<div class="container">
so all page content should be contained by landmarks. -
give class name card instead div.container as page contain more than one element so it is not the container for all content in the page
-
You can wrap your
<div class ="attribution">
in a footer tag like this<footer><div class="attribution"></div></footer>
to avoid accessibility issues. and you can comment the footer tag to hide it
To make your code more Responsive
- instead of using margin in
flex.container
use this to center your elements in the page
body {margin :0;display:flex;flex-direction:column; min-height:100vh} **/*it is a child of the body and we make flex-grow:1 to distribute space-equally in top and bottom*/** main{display:flex;place-items:center;place-content:center;flex-grow:1} **/*you can make it in this challenge to get identical design but don't make it in really site you work on as semantic layout should contain header,main,nav,footer,etc.*/ ** footer{display:none;margin:0}
-
don't give section or div specific height that will damage the responsivity in mobile if width of screen small so remove height and use min-height instead .
-
you can use variables in css and save colors or fixed sizes in variables like this :
:root { --main-color:#3829e0; --font-family:'Red Hat Display',sans-serif; } h1 { font-family:var(--font-family)/*to call value of the variable*/ }
Regardless You did amazing I hope this is useful to you... Keep coding👍
Marked as helpful0 -
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