Design comparison
Solution retrospective
I'm happy to learn about javascript events for the first time.
I preferred adding classes to change the display instead of modifying the style directly.
This was my first time using position absolute.
What challenges did you encounter, and how did you overcome them?I had many challenges with this one.
-
Border radius overflow- My image div kept spilled over the border radius of the card. I tried using the overflow property but ended up needing to add more radius css to the child :/. I'm sure there is a better way
-
Mobile height - In the mobile version the image wasn't displaying. I finally realized the height of the page was too small and manually set it to a huge number. I imagine there is a better way to do this.
-
Message box - the share button was supposed to be a message box but I couldn't figure out a good way to do that. I saw people online adding a separate triangle div, to me that seems pretty finnicky.
-
Share button on mobile - I could not think of a good way to get the share button to display like it does on the mobile version.
-
Positioning the message box - I positioned the message box as relative to it's position, but I wish I found a way to position it relative to the share button - because that's really where it belongs.
-
Used background over
img
- I was having trouble getting the image to crop the way it does in the example. I replaced theimg
component with a div that had the image as a background which seemed to help.
Any of the problems I listed above.
Community feedback
- @Tamikaribi15Posted 8 days ago
I'm pretty new to css so you can take what i say with a grain of salt. But you should probably think about the layout before the contents. For Example: ● What is the size of the container (the card main body) ● Then the container has two sections, what will the sizes be, and how will they look like ● The right section also have some layout too, have will i position this. You gave the '.card' width to be 50% of the body (you could try giving it a definite width, using
max-width
for responsiveness sake) Apart from that, your code was awesome 👌, i saw some new things that i could have used and i can't wait to try them out. P.s i saw some other things but i'm already writing a story here XDMarked as helpful0 - @Tamikaribi15Posted 8 days ago
Oh... for the 'Used background over' problem, you could use:
border-top-left-radius: 10px;
andborder-bottom-left-radius: 10px;
0
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