1
resposta

[Desafio] Resolução dos excercícios

Parte HTML (Base)

<!DOCTYPE html>
<html lang="pt-br">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Portfólio</title>
  <link rel="stylesheet" href="estilo.css">
</head>
<body>
  <div class="container">
    <div class="imagens">
      <img src="img1.jpg" alt="foto 1">
      <img src="img2.jpg" alt="foto 2">
    </div>
  </div>
</body>
</html>

1Ajustando a altura da tela com CSS

body {
  height: 100vh;
  margin: 0; 
  padding: 0;
}

2Controlando o tamanho de elementos com Box Sizing

body {
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
  }

3Criando um layout sem scroll

* {
    margin: 0;
    padding: 0;
    background-color: #000000;
    color: #22D4FD;
    ;
}
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
}
  
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background-color: #000000;
}
  
.imagens {
    display: flex; 
}
  
.imagens img {
    width: 50%;
    height: auto;
}

4Flexbox: alinhando textos e imagens

/*html*/
        <main class="container">
            <div class="texto">My project</div>
            <img src="/logo code.png" alt="foto">
          </main> 
/*css*/
* {
    margin: 0;
    padding: 0;
    background-color: #000000;
    color: #22D4FD;
    ;
}
body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
}
  
.container {
    display: flex;
    align-items: center;
  }
  
  .texto {
    flex: 1;
  }
  
  img {
    max-width: 100%;
  }

5Flexbox: Centralização vertical

.container {
    display: flex;
    align-items: center;
  }  

6Flexbox: responsividade e alinhamento

.container {
    display: flex;
    flex-direction: row; 
  }  
1 resposta

Olá, Luiz! Como vai?

Muito bem, meus parabéns pelo código!

Continue praticando e explorando cada vez mais!

Reforço que em casos de dúvidas, conte sempre com o fórum da comunidade Alura! Bons estudos!

Sucesso

Um grande abraço e até mais!

Caso este post tenha lhe ajudado, por favor, marcar como solucionado ✓. Bons Estudos!