Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Pagina de prueba para computador

@Roggerik

Desktop design screenshot for the NFT preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


¿Quisiera saber como hacen para hacer un diseño de manera horizontal? Para verlo en el móvil, a mi no me aparece la barra de scroll y el diseño se corta

Muchas gracias, espero puedan ayudarme.

Community feedback

PhoenixDev22 16,950

@PhoenixDev22

Posted

Hello Rogger Erikson,

Congratulation on completing this frontend mentor. Excellent work! I have some suggestions:

  • The most important part in this challenge is the interactive element. Since there's a :hover state on the image and means it's interactive, So there should be an interactive element around it. When you create a component that could be interacted with a user , always remember to include interactive elements like(button, textarea,input, ...) For this imagine what would happen when you click on the image, there are two possible ways:

1: If clicking the image would show a popup where the user can see the full NFT, here you use <button>.

2:If clicking the image would navigate the user to another page to see the NFT, here use <a>.

You should have used <a>to wrap Equilibrium #3429 and Jules Wyvern too.

  • Page should at least have one level heading. You can use <h1> instead of <h2>.
  • The link wrapping the equilibrium image (image-equilibrium ) should either have Sr-only text, an aria-label that indicates where the link navigate the user(not describes the image).
  • For any decorative images, each img tag should have empty alt="" and add aria-hidden="true" attributes to make all web assistive technologies such as screen reader ignore those images in (icon-view, icon-ethereum, icon-clock). The images are missing.
  • If you wish to draw a horizontal line, you should do so using appropriate CSS. You may remove the <hr>, you can use border-top: to the avatar's part.
  • Adding rel="noopener" or rel="noreferrer" totarget="_blank"links. When you link to a page on another site using target=”_blank” attribute , you can expose your site to performance and security issues.
  • There are so many ways to add the hover effect on the image , The one I would use, using pseudo-elements to change the teal bg color to a hsla. Then opacity can be changed from 0 to 1 on the pseudo element on hover. There is no need for a extra clutter in the HTML.

Question: why did you use a <section>?

  • According to MDN , <section> is a generic sectioning element that is used whenever it doesn’t make sense to use the other more semantic ones.It is a container that stores self-contained content that still makes sense when placed in a different context. If you are only using the element as a styling wrapper, use a <div>. Visually, your section is probably going to stand out somehow; a different coloured background or some other way to distinguish it from the other content on the page..

You can read more in CSS tricks

Hopefully this feedback helps.

Marked as helpful

0
David 8,000

@DavidMorgade

Posted

Buenas Rogger, enorabuena por terminar tu primer challenge!

Intentaré ayudarte en lo máximo que pueda para ver si podemos solucionar el tema de centrar tu NFT.

  • Primero que todo el div con la clase container, no está sirviendo para nada, puedes quitarlo completamente o dejarlo y quitarle todos los estilos CSS que le has puesto.

  • Una vez realizado eso, agregale el background-color directamente al body (el de fondo oscuro), y haz que tu body ocupe el 100% de la pantalla con un min-height: 100vh, ahora podrás centrar tu componente usando flexbox (también se puede con grid), prueba después de remover todas los estilos del container a poner esto en tu body:

body {
  font-family: 'Outfit';
  display: flex;
  justify-content: center;
  background-color: var(--color-main-BG);
  align-items: center;
  min-height: 100vh;
}

Con esto ya quedaría tu componente centrado con flex-box, para que más o menos entiendas como funciona, al añadirle min-height: 100vh al body, significa que el tamaño mínimo de tu body ocupara toda la pantalla completa, por lo tanto al centrar el elemento de dentro del body (el div con clase container) ya te quedaría completamente en el centro de la pantalla

Espero que mi respuesta te sea de ayuda, y si tienes cualquier duda no dudes en preguntar!, un saludo

2

@jlmunozfdev

Posted

Hola, al principio yo también tuve ese problema y lo que pasa es que estás aplicando el background al contendor, cuando deberías aplicarlo al body. Por otro lado, para que algo se centre en tu pantalla puedes utilizar min-height: 100vh con un display flex: Quedaría más o menos así:

body {
display: flex;
justify-content: center;
align-items: center;
background-color: "color";
min-height: 100vh;
}

Espero haberte ayudado.

1

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord