Skip to content
  • Unlock Pro
  • Log in with GitHub
Profile
OverviewSolutions
18
Comments
9

A.

@MooseCowBearNew York390 points

I’m a mysterious individual who has yet to fill out my bio. One thing’s for certain: I love writing front-end code!

I’m currently learning...

Ruby on Rails, React

Latest solutions

  • Sunnyside Agency Landing Page with Grid


    A.•390
    Submitted about 2 years ago

    0 comments
  • Blogr landing page with Grid and Flexbox


    A.•390
    Submitted over 2 years ago

    0 comments
  • Crowdfunding Product Page with Grid


    A.•390
    Submitted over 2 years ago

    1 comment
  • Testimonials grid section with Grid


    A.•390
    Submitted over 2 years ago

    0 comments
  • Time tracking dashboard with Grid


    A.•390
    Submitted over 2 years ago

    1 comment
  • Tip Calculator with Flexbox and Grid


    A.•390
    Submitted over 2 years ago

    0 comments
View more solutions

Latest comments

  • FunkyCreep•130
    @francoisbillet
    Submitted about 2 years ago

    3-column preview card using Grid, Mobile-first & BEM

    #bem
    2
    A.•390
    @MooseCowBear
    Posted about 2 years ago

    You won't need a a margin. You can just do:

    body { 
       min-height: 100vh, 
       display: grid,
       place-items: center
    } 
    
  • FunkyCreep•130
    @francoisbillet
    Submitted about 2 years ago

    3-column preview card using Grid, Mobile-first & BEM

    #bem
    2
    A.•390
    @MooseCowBear
    Posted about 2 years ago

    The way I like to think about components like this is: Can the way I'm writing the component be reused in a different layout without changing anything?

    If you center the component by specifying a margin on the component itself, you'd have to alter the component if you were to embed it in a different space. Not a huge deal, but it's maybe more work than you want. I would be nice to not have to do anything. Positioning by using grid or flexbox on the body will allow your future self (or someone else) to be lazy (in a good way!).

    You're right that you will need a height on the body in order to use grid centering. You can set the height (or even better the min-height) to 100vh. Then, since it's the only thing in the body, its center will be whatever the center of the window will be.

    Marked as helpful
  • NedhalM•40
    @Meii-Lssa
    Submitted about 2 years ago

    Responsive signup form

    1
    A.•390
    @MooseCowBear
    Posted about 2 years ago

    Hi NedHalm,

    You can add a hover effect even though it is a link. You'd just add a rule like "element:hover { whatever effect you want }". In this case, it looks like it's probably a filter to increase the brightness of the element.

    If you want to add the same effect for someone who is using a keyboard to navigate, you can add a element:focus to the same rule.

  • mbongoelvis•540
    @mbongoelvis
    Submitted over 2 years ago

    FAQ-Accomodation-Card

    #angular#express
    1
    A.•390
    @MooseCowBear
    Posted over 2 years ago

    It looks like what's happening is that you have made the mobile layout with two columns (display flex defaults to row so the mobile layout has two sections next to one another) and then you force the image to be above the text section by using absolute positioning. Then when you move to the desktop layout, the absolute positioning is still doing what you've told it to do but now the "top: -130px, right: 10%" is that upper right hand corner.

    If you want to stick with Flexbox, what you want to do is ditch the absolute positioning and instead use "flex-direction: column" to position the image above the text in the mobile view. Then in the desktop view, switch it back to row.

  • Liam•90
    @LiamMarrie
    Submitted over 2 years ago

    Expenses Chart

    2
    A.•390
    @MooseCowBear
    Posted over 2 years ago

    It looks like you have given all of your bars a height of 20vh. What you probably want is to set a max-height on the bars so they won't distort the size of the component, and then use JS to calculate what the proportion of the max-height each item should be. You can use a scaling function to set the max value spent to the max height of the column, as discussed in this thread.

    Alternatively, you could do something like each $10 spent corresponds to x many pixels (or em, or rem, or whatever your preferred unit is) and then calculate the heights by dividing by 10. That does have the potential to have very large columns on, say, a day the user bought a car.

    If you want to get even fancier, you can use a log scale. That way even large deviations in spending do not result in huge differences in bar height.

    Marked as helpful
  • Kapil•40
    @KAPIL9027
    Submitted over 2 years ago

    Css Flexbox with div elements.

    4
    A.•390
    @MooseCowBear
    Posted over 2 years ago

    You can also use absolute positioning, top and left properties, and then a transform translate combination to center things, but it is a lot uglier than either flex or grid so I wouldn't recommend it.

View more comments
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub