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

First mobile, flex-box

Luis Yps Fdezβ€’ 70

@azyepes29

Desktop design screenshot for the NFT preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


How can I keep the cyan hover at 50% opacity but the view icon with 100% opacity? I just left both with 50% opacity. Thanks

Community feedback

darryncodesβ€’ 6,430

@darryncodes

Posted

Hi Luis,

I'd recommend simplifying your background styles.

And just to say the 375px and 1440px given in the design is just a guide it's not prescriptive, use your intuition to style the most responsive best looking design you can.

Anyway i'd do the following:

body {

    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--verydarkbluemainBG);

main {

    /* min-width: 375px; */ remove 
    /* max-width: 1440px; */ remove
    /* width: 100%; */ remove
    /* height: auto; */ remove
    /* background-color: var(--verydarkbluemainBG); */ moved to body
    display: flex;
    flex-direction: column;
    /* align-items: center; */ remove
    /* padding: 50px 0 0; remove

Marked as helpful

1
Chrisβ€’ 20

@Afrochamploo

Posted

I had the exact same problem, just started learning two weeks ago.

Try adding a layer (<div class=''layer''></div> in html )and position it on top of your nft-image . You can do this with the (::after) pseudonym and (content='' ''), set it to transparent or opacity set to 0. Then when :hovering over the image set the background-color on your new div layer to cyan with the opacity around 0.5

Marked as helpful

1
Anosha Ahmedβ€’ 9,340

@anoshaahmed

Posted

Hey Luis, good job on the challenge. When I open your webpage on my laptop, it doesn't cover my entire screen. To fix that, I would change max-width of <main> to min-width: 100vw, and height: auto to min-height: 100vh

:) Good job!

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