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

Four card feature section

@mohsenrostami2000

Desktop design screenshot for the Four card feature section coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I have a problem with footer! I did set "height:100vh;" and "display: flex;" "flex direction: column", but in Chrome when I check in inspect, on a larger screen, the footer is not stick at the bottom. can anyone help me with that?

Community feedback

Josh 1,070

@josh76543210

Posted

Hi @mohsenrostami2000,

Good job on your solution. Looks great!

An easy way to make the footer stick to the bottom of your page on larger screens is to set a margin-top: auto; on the footer:

footer {
  margin-top: auto;
}

This works because you have are using flex-box for the body in the media query. If you also want the footer to stick to the bottom on smaller screens too then you have to use flex-box for all screen sizes:

body {
  display: flex;
  flex-direction: column;
}

Hope this is helpful for you.

Happy Coding!

Marked as helpful

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