freeCodeCamp/curriculum/challenges/portuguese/01-responsive-web-design/applied-visual-design/create-visual-balance-using...

2.6 KiB

id title challengeType videoUrl localeTitle
587d7791367417b2b2512ab3 Create Visual Balance Using the text-align Property 0 Criar equilíbrio visual usando a propriedade text-align

Description

Esta seção do currículo se concentra no design visual aplicado. O primeiro grupo de desafios baseia-se no layout do cartão para mostrar vários princípios fundamentais. O texto geralmente é uma grande parte do conteúdo da web. CSS tem várias opções de como alinhá-lo com a propriedade text-align . text-align: justify; faz com que todas as linhas de texto, exceto a última linha, atendam às bordas esquerda e direita da caixa de linha. text-align: center; centraliza o texto text-align: right; alinhar à direita o texto E text-align: left; (o padrão) alinha à esquerda o texto.

Instructions

Alinhe o texto da tag h4 , que diz "Google", ao centro. Em seguida, justifique a tag de parágrafo que contém informações sobre como o Google foi fundado.

Tests

tests:
  - text: Seu código deve usar a propriedade text-align na tag <code>h4</code> para configurá-lo para o centro.
    testString: 'assert($("h4").css("text-align") == "center", "Your code should use the text-align property on the <code>h4</code> tag to set it to center.");'
  - text: Seu código deve usar a propriedade text-align na tag <code>p</code> para configurá-lo para justificar.
    testString: 'assert($("p").css("text-align") == "justify", "Your code should use the text-align property on the <code>p</code> tag to set it to justify.");'

Challenge Seed

<style>
  h4 {

  }
  p {

  }
  .links {
    margin-right: 20px;

  }
  .fullCard {
    border: 1px solid #ccc;
    border-radius: 5px;
    margin: 10px 5px;
    padding: 4px;
  }
  .cardContent {
    padding: 10px;
  }
</style>
<div class="fullCard">
  <div class="cardContent">
    <div class="cardText">
      <h4>Google</h4>
      <p>Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University.</p>
    </div>
    <div class="cardLinks">
      <a href="https://en.wikipedia.org/wiki/Larry_Page" target="_blank" class="links">Larry Page</a>
      <a href="https://en.wikipedia.org/wiki/Sergey_Brin" target="_blank" class="links">Sergey Brin</a>
    </div>
  </div>
</div>

Solution

// solution required