2
respostas

pagina contato perdeu a formatação

A página contato perdeu a formatação na header e os elementos estão escostados ao lado esquerdo. O código do html está assim:

<!DOCTYPE html>

<html>

    <head>
        <meta charset="UTF-8">
        <title>Produtos - Barbearia Alura</title>
        <link rel="stylesheet" href="reset.css">
        <link rel="stylesheet" href="style.css">
    </head>

    <body>

            <header>
                <div class = "caixa">
                <h1><img src="logo.png" alt="logo Barbearia Alura"></h1>
                <nav>
                    <ul>
                        <li><a href="index.html">home</a></li>
                        <li><a href= "produtos.html">produtos</a></li>
                        <li><a href= "contato.html">contato</a></li>
                    </ul>
                </nav>
                </div>
            </header>   

            <main> 
                <form>
                    <!-- text eh o input que recebe texto -->

                    <label for="nomesobrenome">Nome e sobrenome</label>
                    <input type="text" id="nomesobrenome" class="input-padrao" required>

                    <label for="email">Email</label>
                    <input type="email" id="email" class="input-padrao" required placeholder="seuemail@dominio.com">

                    <label for="telefone">Telefone</label>
                    <input type="tel" id="telefone" class="input-padrao" required placeholder="(DDD) XXXXX-XXXX">

                    <!--textarea = texto de mais de uma linha-->
                    <label for="mensagem">Mensagem</label>
                    <textarea cols="70" rows="10" id="mensagem" class="input-padrao"></textarea required>

                    <!-- radio eh o tipo de input das bolinhas --> 

                <fieldset>

                    <legend>Como prefere o nosso contato?</legend>
                    <label for="radio-email"><input type="radio" name="contato" value="email" id="radio-email">Email</label>

                    <label for="radio-telefone"><input type="radio"  name="contato" value="telefone" id="radio-telefone">Telefone</label>

                    <label for="radio-whatsapp"><input type="radio"   name="contato" value="whatsapp" id="radio-whatsapp" checked>  Whatsapp</label>

                </fieldset>

            <fieldset>
                <!---->
                <legend id="titulo">Qual horário prefere ser atendido?</legend>
                <select>
                    <option>Manhã</option>
                    <option>Tarde</option>
                    <option>Noite</option>
                </select>
            </fieldset>

                <!-- checkbox eh o input de checkbox-->
                <label><input type="checkbox" class="checkbox" checked> Gostaria de receber nossas novidades por email?</label>

                    <input type="submit" value="Enviar formulário" class="enviar">

                </form>


                <!--
                    A tag table, que representa a tabela
                    A tag tr, que representa a linha da tabela
                    A tag td, que representa a célula da tabela
                    A tag thead, que representa o cabeçalho da tabela
                    A tag tbody, que representa o corpo da tabela
                    A tag th, que representa a célula do cabeçalho da tabela
                    A tag tfoot, que representa o rodapé da tabela
                -->
                <table>
                    <thead>
                        <tr>
                            <th>Dia</th>
                            <th>horário</th>
                        </tr>
                    </thead>

                    <tbody>
                        <tr>
                            <td>Segunda</td>
                            <td>8 ~ 20h</td>
                        </tr>
                        <tr>
                            <td>Quarta</td>
                            <td>8 ~ 20h</td>
                        </tr>
                        <tr>
                            <td>Sexta</td>
                            <td>8 ~ 20h</td>
                        </tr>   
                    </tbody>
                </table>

            </main>

            <footer>
                <img src="logo-branco.png" alt="logo da barbearia alura em branco">
                <p class="copyright">&copy; Copyright Barbearia Alura - 2019</p>
            </footer>

    </body>



</html>

E o CSS enviarei em um comentário

2 respostas
body{
    font-family: 'Poppins', sans-serif;
}

body p{
    font-family: 'Poppins', sans-serif;
}


header { 
    background: #BBBBBB;
    padding: 20px 0;
}

.caixa {
position: relative;
width: 940px;
margin: 0 auto;
}



nav {
position: absolute;
top: 110px;
right: 0;
}


nav li {
    display: inline;
    margin: 0 0 0 15px; 
}

nav a {

    text-transform: uppercase;
    color: #000;
    font-weight: bold;
    font-size: 22px;
    text-decoration: none;

}

nav a:hover{
color:     #b7a439;
text-decoration: underline;
}


.produtos{
    width: 940px;
    margin: 0 auto;
    padding: 50px 0;
}

.produtos li {

   display: inline-block;
   text-align: center;
   width: 30%;
   vertical-align: top;
   margin: 1.5%;
   padding: 30px 20px;
   box-sizing: border-box;
   border-color: #000;
   border-width: 2px;
   border-style: solid;
   border-radius: 10px;
}

.produtos li:hover{
    border-color:    #b7a439;


}

.produtos li:active{
    border-color:    #1f71bd;
}


.produtos h2 {
  font-size: 30px;
  font-weight: bold;
}

.produtos li:hover h2{
    font-size: 40px;
}

.produtos li:active h2{
    color: #1f71bd;
}

.descricao-3{
text-align: center;
font-size: 17px;
}


.produtos li:active p{
    color: #1f71bd;

}

.produto-preco {    
 font-size: 20px;
 font-weight: bold;
 margin-top: 10px;
}

footer{
    text-align: center;
    background: url("bg.jpg");
    padding: 40px 0;
}

.copyright {
    color: #FFFFFF;
    font-size: 13px;
    margin: 20px 0 0;
}

main{

}

form{
    margin: 40px 0;
}

form label, form legend{
    display: block;
    font-size: 20px;
    margin-right: 0 0 20px;
    padding: 10px;
}

.input-padrao{
    display: block;
    align-content: center;
    margin: 0 0 20px;
    padding: 10px 25px;
    width: 50%;
}

.checkbox {
   margin: 20px 5px;

}

#titulo{
   padding: 20px 0;

}

.enviar {
    width: 40%;
    padding: 15px 0;
    background: #b7a439;
    color: white;
    font-weight: bold;
    font-size: 18px;
    border: none;
    border-radius: 5px;
    transition: 1s all;
}

.enviar:hover{
 background-color: #1f71bd;
 cursor: pointer;
 transform: scale(1.2);
}

table{
    margin: 20px 40px;
}

thead{
    background: #555;
    color: #FFFFFF;
    font-weight: bold;
}

td, th{
    border: 1px solid #000;
    padding: 10px;
}

/*css da pagina inicial */

.banner{
    width: 100%;
}

.titulo-principal{
    text-align: center;
    font-size: 2em;
    margin:1em 0 1em;
    clear: left;
}

.titulo-principal:second-letter{
    font-weight: bold;
}

.titulo-principal:before{
content: "[ ";
}

.titulo-principal:after{
content: " ]";
}

.principal{
    padding: 3em 0;
    background: #fefefe;
    width: 940px;
    margin: 0 auto;
}

.principal p{
 margin: 0 0 1em;
}

.principal strong{
    font-weight: bold;
}

.principal em{
    font-style: italic;
}

.utensilios{
    width: 120px;
    float: left;
    margin: 0 20px 20px 0;
}

.beneficios{
    padding: 3em 0;
    background: #888;
}

.conteudo-beneficios{
    width: 640px;
    margin: 0 auto;
}

.lista-beneficios{
    width: 40%;
    display: inline-block;
    vertical-align: top;
}

.beneficios-img{
    width: 60%;
}

.itens{
    line-height: 1.5;
}

.itens::before{
    content: "✹";
}

.itens:first-child{
    font-weight: bold;
}

.mapa {
    padding: 3em 0; 
    background: linear-gradient(white, #888);
}

.mapa-conteudo{
    width: 940px;
    margin: 0 auto;
}

.mapa p{
    margin: 0 0 2em;
    text-align: center;
}

.video{
    width: 640px;
    margin: 5em auto;
}

Olá, Gabrieli.

Tudo bem?

Isso aconteceu porque tirou as propriedades da <main> no CSS. Para corrigir basta adicionar uma classe CSS na <main> da página de contato, pode ser o nome que achar melhor, eu vou utilizar o .menu-contato como exemplo e então adicionar as seguintes propriedades:

HTML:

 <main class="menu-contato"> 
                <form>...

CSS:

.menu-contato{
    width: 940px;
    margin: 0 auto;
}

Testa ai Gabrieli.

Espero ter ajudado. Qualque dúvida manda aqui. Valeu!