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

Responsive layout with HTML5 and CSS Flexbox

@Raphaelavazq

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are you most proud of, and what would you do differently next time?

While working on this project, I significantly improved my understanding of responsive design, especially using Flexbox.

This project also reinforced the importance of mobile-first design and how to effectively use media queries to adapt the layout for larger screens.

What challenges did you encounter, and how did you overcome them?

was more difficult to understand media queries

What specific areas of your project would you like help with?

I had some issues with my GitHub Pages site because my CSS seems to not be applied i

Community feedback

Daniel 🛸 44,230

@danielmrz-dev

Posted

Hello, @Raphaelavazq!

Your project is looking fantastic!

I'd like to suggest a way to make it even better:

  • I noticed that your card is not centered.

Here's a highly efficient approach to position an element at the center of the page both vertically and horizontally:

📌 Apply this CSS to the body (avoid using position or margins in order to work correctly):

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

I hope you find this helpful!

Keep up the excellent work!

Marked as helpful

0

@Raphaelavazq

Posted

Hello @danielmrz-dev!

Thanks for your feedback 😊

What is happening is that I am having some troubles with the GitHub Pages because it seems that my CSS is not being applied... 😞

On my live-server, it is centered and looks good...

👉 have my CSS correctly linked in HTML and I couldn't find the problem yet. It is my first project using GitHub Pages, maybe you have some tip to sort it out?

Obrigada 😉 ( i m Portuguese ,by the way ... 🇵🇹)

💡and i centered with flexbox on the card and not on the body like this:

.qr-code-component {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 80px 20px;
  background-color: var(--light-gray);
  text-align: center;
}
1

Daniel 🛸 44,230

@danielmrz-dev

Posted

@Raphaelavazq

Não sabia que você falava português 😊

Achei o problema no seu código, aqui está:

  <link rel="stylesheet" href="css/style.css">

QUando você estava fazendo o projeto no seu computador, provavelmente você manteve o arquivo style.css nessa pasta separada chamada css. Mas na hora de fazer upload pro Github, você tirou o arquivo da pasta e fez o upload de todos os arquivos juntos, então aquela pasta css não veio.

Por esse motivo, o seu arquivo HTML está procurando o seu arquivo CSS nessa pasta css/style.css, mas ela não existe.

Você só precisa atualizar o caminho correto para o arquivo CSS, dessa maneira:

  <link rel="stylesheet" href="style.css">

Espero que ajude!

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