@DavidMorgade
Posted
Buenas Veronica, enorabuena por terminar el challenge, hiciste un buen trabajo!
Con tu permiso me gustaría darte algunos consejos que pueden servirte para otros challenges.
- Primero que todo intentaría centrar bien el product card completo usando flex-box en vez de margins, te va a costar mucho menos y para ello solo tienes que darle al body un min-height de 100vh (para que ocupe toda la pantalla) y usar flex para centrar, algo mas o menos así (primero quitando todos los margins del div class 'card'):
body {
background-color: hsl(30, 38%, 92%);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: 100vh;
}
Con eso ya te quedaría completamente centrado!
-
Para la imagen del producto, en este caso sería mejor que la pusieras directamente en el html, como tienes que poner una para desktop y otra para mobile, en vez de usar el tag
img
, usa los tags<picture></picture>
y dentro de ese tag pones dos<source>
tags, uno con la imagen para mobile y otro para la imagen desktop, con esto puedes poner la imagen condicionalmente dependiendo del tamaño de la pantalla (como si fuese un media querie, pero en una imagen html), si tienes dudas del tag picture, aquí lo explican bastante bien! -
Finalmente te aconsejaría que siempre que tengas un botón, le agregues un
cursor: pointer
(para que se vea la manita de como que se puede pulsar) y si además le añades una pequeña transición tipotransition: all 0.5s ease;
ya queda incluso con una apariencia más bonita y fluida!
Espero que mi feedback te ayude en tus futuros proyectos, cualquier duda que tengas no dudes en preguntarmela que estoy aquí para ayudarte! Un saludo!
Marked as helpful
@veronicajujuy
Posted
@DavidMorgade Muchas gracias por tu comentario!! por supuesto que me ayuda a mejorar!! voy a poner en practica lo que me pones :)