Responsive Landing Page with CSS, HTML and a little JavaScript.
Design comparison
Solution retrospective
Hello, everyone! This is my first solution for this challenge after I stopped learning web development for a year. So, here are what I'm confused at:
- Why doesn't the contact button :focus state stay that way after clicked?
- Why didn't the content in the fourth-content (the one with cherry and orange background) stick to the position? I've tried to add position: absolute but the content still all over the place when I resize the screen.
Thank you!
Community feedback
- @BenConfigPosted almost 3 years ago
Hey, well done on this challenge, it looks quite tricky.
-
The contact button doesn't stay focused because of
href="#contact"
. I think this is linking to something which doesn't exist on the page which is removing focus from the link itself. If you change the attribute tohref="#"
it will fix the problem. I did notice that you have duplicated every property for the:hover
and:focus
styles. I think you can remove them all exceptcolor
andbackground-color
, since these are the only properties that actually change? -
I think the problem you're having is getting the text to stay at the bottom of the container? You could use grid to fix this. On
.content-with-cherry
changedisplay: block;
todisplay: grid;
. Removealign-items: center;
and addalign-content: end;
. Add somepadding-bottom
so the text isn't sticking to the bottom. Then do the same with.content-with-orange
.
1@haneulffer98Posted almost 3 years ago@BenConfig I did what you suggested and it worked! Your analysis was on point. I will pay more attention to contradictive or duplicated properties in the future. Thank you so much for your feedback and answers.
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