Flexbox, max-width, relative units, media query, Mobilefirst-WorkFlow
Design comparison
Solution retrospective
I finished up this work and I am now a little more comfortable with flexbox. I hope you like my work.
I've got one issue. If you hover in desktop or mobile size, the height of my boxes increase because my button
increases by 1px due bordering. Does someone have a hint or idea how I can fix that without giving my height a fixed value? I would like to stay responsive.
Community feedback
- @adityaphasuPosted over 1 year ago
Hi!
To answer your question there's quite an easy fix for it! Add a transparent 1px border to your button and just change the color of it when hovered like this:
button{ border: 1px solid transparent; //rest of the styles } button:hover{ border-color: white; }
This way the button won't move when hovered as there will still be a border on it when it isn't hovered. (faced this same challenge when I did this project haha)
Happy coding!πΊπ»
Marked as helpful1@devaramnyePosted over 1 year agoI would like to give a big hug ... I changed it now and everything worked without losing responsivness. Have a beautiful night. In germany we have 11:06 pm right now and I can go to bed without any thoughts of my last project.
I wish you a good sleep and a beautiful start in your day. Stay healthy!@adityaphasu
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