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

Bookmark landing page with FlexBox and JavaScript

gomezlucas 1,115

@gomezlucas

Desktop design screenshot for the Bookmark landing page coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
3intermediate
View challenge

Design comparison


SolutionDesign

Solution retrospective


I'd like to ask about the background figures. What i did was set up a div with an absolute position, and then moved it around. Like this: .header-figure { background: var(--softBlue); position: absolute; bottom: -18px; right: 0; width: 40%; height: 55%; border-top-left-radius: 40%; border-bottom-left-radius: 40%; z-index: -1;

any other or better option? thanks!

Community feedback

P
Matt Studdert 13,611

@mattstuddert

Posted

Hey Lucas, great work on this solution! The way that you've done the background pattern is fine. Another way, which would reduce the HTML would be to use a pseudo-element, like ::before to do the same. For the border-radius you can also set a really high pixel value, instead of a percentage to make sure the corners are fully rounded e.g. border-bottom-left-radius: 500px;.

I hope that helps!

1

gomezlucas 1,115

@gomezlucas

Posted

@mattstuddert Perfect! I got it now! and it definitely would save some space in the HMTL and make it clearer. Thank you very much!

0
P
Matt Studdert 13,611

@mattstuddert

Posted

@gomezlucas you're welcome!

0
gomezlucas 1,115

@gomezlucas

Posted

@mattstuddert hello Matt! thanks for your answer! what do you mean by reduce the html with ::before? Like setting the figure size with that pseudo element? thanks!

0
P
Matt Studdert 13,611

@mattstuddert

Posted

@gomezlucas no worries! If you used the pseudo-element then you wouldn't need the <div class="header-figure"></div> in your HTML. You would instead do something like this is your CSS:

.header-container {
  position: relative;
  /* other styles */
}
.header-container::before {
  content: "";
  position: absolute;
  /* other styles */
}

Here's the MDN article on the before pseudo-element for more information.

Let me know if you have any more questions 👍

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