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

Profile Card Chellenge using background-image positioning.

@ro-andrade

Desktop design screenshot for the Profile card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

Lucas 👾 104,420

@correlucas

Posted

👾Fala @ro-andrade, tudo bem? Parabéns pelo desafio!

1.Seu background só não está mostrando porque vc esqueceu de definir o local da imagem com ./ pra mostrar a pasta, tenta assim background-image: url(./bg-pattern-top.svg), url(./bg-pattern-bottom.svg);

body {
    background-color: var(--body-bgColor);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-image: url(./bg-pattern-top.svg), url(./bg-pattern-bottom.svg);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: -350px -560px, 600px 350px;
}

Note que se você estiver usando a usando a pasta no desktop ou com servidor local, o navegador vai reconhecer o local da imagem e carregar sem vc ter que definir exatamente onde está o asset, mas com com o site online/repositório você precisará indicar onde está a imagem. Lembre-se, quando a imagem estiver dentro da pasta do repositório use ponto barra ./ e se estiver dentro de uma subpasta use ponto ponto barra ../ Se a imagem for a mesma pasta do html sem pasta basta adicionar o caminho normal.

2.Adicione uma margem em volta do container demais ou menos margin: 20px pra evitar as bordas do card/container ficar tocando os limites da tela quando ele começar escalar.

👋 Espero ter ajudado e continue no foco!

Marked as helpful

0

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