@AgataLiberska
Posted
Hi Yann! Your solution looks great, well done! Everything looks responsive, although I am not sure about setting a width of the container in column to 300px - you can get viewports that are less than that, but the issue would be just visual in this case (the user would still be able to click the buttons). I would just set a max-width
instead, I think. And a few more tips:
-
Adding a transition to your hover states makes the design look more polished and professional
-
Instead of adding the rounded corners on end cards individually, you can set
border-radius
on the container, just make sure to addoverflow: hidden
as well - it's a good trick to know :) -
Some people consider using ids in CSS to be a bad practice (but then again, others disagree and say it's perfectly fine). Another way to add the background colors to your card would be to add helper classes, like
.yellow {background-color: yellow;}
or to use a pseudo selectornth-of-type(n)
This is a good article that explains it, I think
Hope this helps :)
@Yannotron
Posted
@AgataLiberska Thanks a lot, I am slightly confused as to what you mean ref to the container size. Could you guide me towards a better solution?
Transition: Absolutely! :) Rounded corners on container: I will but do not understand what <code>overflow:hidden</code> would achieve. Could you elaborate?
Helper classes: I learned about class utilities while building this page. Is it the same as a helper class?
:)
@AgataLiberska
Posted
@Yannotron
Container size: you set your width to 300px in mobile design. On a viewport with width smaller than 300px, the content will overflow the screen and user will have to scroll horizontally to to read the text. In this project this is just visual, like I said, but it's a good thing to remember to check. You can learn more about this issue here. I would personally change width
to max-width
:)
Rounder corners - if you set border-radius
on the container and not add overflow:hidden
, the children (without rounded corners) will overflow and cover it up. I found a nice example of this here
- helper classes - yes, in CSS I think those names are used interchangeably (I just had to google this to make sure :D)