@javascriptor1
Posted
Hi Vanessa,
Congratulations on completing your second project. Excellent job. Here are some remarks which I hope you found helpful:
HTML
- You have done a good job using semantic HTML elements. There is one tag in the ingredients section which should be change from
ul
to 'ol' ;
<ul class="instructions__list">
As this is an ordered list , the ol
should be used.
-
For alt text related to images inside HTML , and as per W3C website , you should avoid "Superfluous information in the text alternative. Usually, there’s no need to include words like “image”, “icon”, or “picture” in the alt text. People who can see will know this already, and screen readers announce the presence of an image".
-
The last row in the Nutrition section table should not have a border bottom. You have to remove the border-bottom by using
.nutrition__table tr::last-child
selector and assign valuenone
to border-bottom
CSS
-
The main container should be a little wider. This affects some content and causes extra lines for some
p
elements like the one underh1
tag. Instead of 2 lines like the design, your paragraph spans into 4 lines. -
For responsiveness, you said in a reply to one comment the following :
"I used 1440px cause was the number in the guide styler!"
When I started learning about responsiveness, and start doing FEM challenges here, I got confused just like you about the two designs ( 375 & 1440px) which appear in all challenges style guides.
The design folder for all challenges is shipped with at least 2 photos :
1- For mobile devices ( width is 375px).
2- For desktop computers ( width is 1440px).
However, your solution should be responsive even for devices that fall between these 2 sizes like 500px, 800px, and 1200px.
These 2 designs are working as a guide for you on how the mobile design should look like and how the desktop design should look like.
For example, in this challenge, The image on top should take full width (100%) on mobile devices. So you should make your design considering this and set a breakpoint as to where to break into desktop design.
If we check your solution again , try to view the design on 799px using dev tools in chrome, then go up to 800px where you set a breakpoint for desktop design.
You will see a big photo until 799px then a small container when you switch to desktop design( you set it max @ 35% of screen width). Sô, here is a problem. The screen is 800px and the container is only 35% wide of the screen which is very small.
So, To code it right, whenever you break into the desktop design, the page should look like the same one provided in the design folder for desktop view.
I hope it's clear now for you.
- There are some declarations in CSS which have no effect as they are default values. Examples of this are the following ( see the last commented two declaration) :
.table__infos {
font-family: var(--secondary-font);
color: var(--wenge-brown);
/* font-size: 16px; */
/* font-weight: 400; */
}
When you finish styling, try to clean up your CSS files by removing all declarations which have no effect.
Best of Luck and keep coding.
Regards,
MKF
Marked as helpful
@javascriptor1 Hello there!
First of all: Glad to have you here! :D I'm so happy learning a lot!
I apreciate all of the compliments about the code!
And of course, thanks for the awesome advices!
I made some adjustments. But, about the image size, i think i need one more help. Can you give me a solution to how made a good and responsive resolution image in CSS?
Anyways! I'm really apreciate your time and help :)
Thanks in advance!
@javascriptor1
Posted
Hi Vanessa,
What you have done with the image in this challenge is right. To make an image responsive, and bring it "under your control", give it width:100%
.
Images behave like foreign objects in relation to document flow. Whenever you add any image to your HTML page, It will be added based on the original image size. In this challenge, the image is very big and it will cause overflow when added. To bring this image under control, we set the width to 100% which will make the image responsive based on screen width or parent container.
I can see you have increased the container width to 45% of the screen, so the image will take width according to the parent container after any padding/margin and how you set border-box sizing.
You can also use min-width and max-width according to your design needs.
I hope this will help.
keep coding