Responsive Card Component Using Ancient Technique... Floats, and Media
Design comparison
Solution retrospective
Hey There! Criticism is needed (Jumping straight into questions.)
-
I was surprised to learn that <img> tags can't have a background color by simply adding a background property. It took me a while to research how to change the color of the main image and I still could not bring it to perfection.
-
My main focus for this project was to get familiar with "ancient" techniques. So I used "Floats" instead of "Flexbox" or "Grid". I'm a little hesitant about jumping into "Flexbox" or "Grid" because I feel like I'm not good enough with using "Floats". Should it be like that?
-
Another thing that almost made me mental was trying to stretch my image to cover the remaining margin and make it responsive. I made a lot of mess with the "Height" properties, I found it difficult to use the "Height" property more than the "Width" property.
A cleaner and more efficient method would be greatly appreciated. Best practice and ANY Advice/Feedback/Criticism will also be extremely helpful and appreciated.
Community feedback
- @ExiviuZPosted over 2 years ago
The photo somehow get squeezed when the website is getting smaller and smaller around breakpoint 900, you can use the img property, object-fit: cover; so the image gets proportionate according to its parent or container.
Marked as helpful1 - @leverhPosted over 2 years ago
Hi Cornflakes, I'm no expert but i don't think you should be wary of using flexbox and grid. As far as i understand, floats are an old fashioned method of placing text around images- much like how newspapers and magazines used to work. But times have changed and luckily we have flex and grid to help us create prettier and more functional website/apps designs. Here's an article i found on the matter (it's short... ;)): https://nimblewebdeveloper.com/blog/css-float-deprecated Other than that i thought your solution looked even better than the original ;)
xx
1@CornflakesPlusPosted over 2 years ago@leverh Blushing. Honestly, I would rate my solution 4/10 ;D. I see you're trying to lift my spirit (Which I desperately need). :)
"A man must first endure the pain of using floats to truly appreciate Flexbox" ~ Master Oogway
I think I've endured enough. So it seems I might jump into Flexbox for my next project. Thank you for the kind words. I've seen your profile, not pretty bad yourself maybe start calling yourself an expert ;).
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