@correlucas
Posted
👾Hello @rynex-zv, Congratulations on completing this challenge!
Your solution its almost done and I’ve some tips to help you to improve it:
1.Using <picture>
you’ve more control over the elements and its better than using the product image as <img>
or background-image
. Look that for SEO and search engine reasons it isn't a better practice to import this product image with CSS since this will make it harder to the image. You can manage both images inside the <picture>
tag and use the html to code to set when the images should change setting the device max-width
depending of the device (phone / computer) Here’s a guide about how to use picture
: https://www.w3schools.com/tags/tag_picture.asp
2.Use units as rem
or em
instead of px
to improve your performance by resizing fonts between different screens and devices. These units are better to make your website more accessible. REM does not just apply to font size, but to all sizes as well.
3.Something that can be a time saver for you is to use a CSS RESET to remove all default settings for margins, making the images easier to work, see the article below where you can copy and paste this css code cheatsheet: https://piccalil.li/blog/a-modern-css-reset/
✌️ I hope this helps you and happy coding!
Marked as helpful
@rynex-zv
Posted
@correlucas Thanks for the tips!
So <picture>
is like an <img>
media query container in html, nice!
I haven't learned html before, I'm learning it as i go; and things like this are not visible without someone pointing them, thanks so much! I will start including the CSS RESET in my projects😊
2 question though:
1.how do you get the frame size as the solution previewer? I have scaled distances and set them as reference images but when I load the project my container is always smaller than expected so what do you think is going on?
- Attribute
c
not allowed on elementbutton
at this point.
Context:
<button id=`submeter` class=`card-btn` c=`n`>
what else shall I do? is it really wrong? I'm using it to change the animation state and the button
is the container of the svg
and the span
.