@vanzasetia
Posted
Hi there! π
Congratulations on completing another challenge! π It's good to see you finishing another challenge. π
Regarding your questions,
- I did the same thing as you did. I put the
img
outside the container of the elements. Also, I couldn't think of a better approach so I believe this is already a good solution though. π - I think it's better to use
p
instead oful
since it is not a list. - As far as the CSS, I would recommend getting yourself familiar with
rem
units. In general,rem
is better thanpx
because it adapts the user's font size setting (browser or even system setting).
One suggestion, all the images on this page are decorative images. So, I would recommend leaving the alt=""
empty. I can that because if I remove all the images, then there won't be any missing information, it's just make the site looks less beautiful.
I hope this helps. π
Marked as helpful
@vanzasetia thank you again for answering my questions! π
Regarding the rem
unit. does it change when I set the font size to a different value?
-
If default the default value is 16px = 1rem
-
If I change the font size to 20px does it change to 20px= 1rem?
@vanzasetia
Posted
@KurtJF
The default value of the 1rem
depends on the user's font size setting. In general, developers like to think that the users won't change the default browser's setting. So, we can assume that most users would have 16px
font size in their browser settings. That's why 1rem
is equal to 16px
.
But, if you set the font-size
of the html
element then it will overwrite the user's font size setting.
For example:
html {
font-size: 10px;
}
body {
font-size: 1rem;
/* Now, 1rem = 10px regardless of the user's font size setting */
}
However, it's best to never change the html
font size since it can cause huge accessibility implications for those users with different font sizes or zoom requirements. Also, when you are working with a CSS framework, you will change every size that the framework has defined.
Marked as helpful
@vanzasetia thanks for the explanation! Btw your explanations are easy to understand.π
@vanzasetia
Posted
@KurtJF
Thank you for saying that! I am happy that you can easily understand my explanations! π