Single price component: HTML5, CSS3, Flexbox

Solution retrospective
I was able to implement the responsive behavior. I also updated the HTML to address some suggested fixes.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @MohamedAridah
Hello @detomdev, yours solution was really good, but unfortunately it wasn't Responsive. you can improve you solution by the following:
-
For
body
usingoverflow
hidden will prevent scrolling. and this bad because user can't see the full content vertically. So you should Removeoverflow: hidden
property. -
For
.container
:border-radius
property for bottom-right and bottom-left corners wasn't working properly and you can use overflow of hidden.- For responsiveness set
max-width
andmargin
to center it horizontally. box-shadow
was too much. try to use light color.!
.container { max-width: 90%; /* don't take more than 90% of viewport width*/ margin: auto; /* center `.container` horizontally in the viewport width */ overflow: hidden; }
- HTML suggestion:
- instead of using
<div class='subscription'></div>
and<div class='why'></div>
separately. you can combine them in one div. This will make responsiveness very easy. OR
- instead of using
use your *Current HTML structure with the following styles:
@media(max-width:640px) { .container { flex-direction : column; } }
- For
.tutorials
insidewhy
div.ul
element (unordered list) will be much better than usingbr
.
<ul> <li>Tutorials by industry experts </li> <li>Peer & expert code review </li> <li>Coding exercises</li> <li>Access to our GitHub repos</li> <li>Community forum </li> <li>Flashcard decks </li> <li>ew videos every week</li> </ul>
I hope this wasn't too long for you, hoping also it was useful😍.
Goodbye and have a nice day. Keep coding🚀
Marked as helpful -
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