1
I’m starting now to study HTML, someone knows how to put the form I created below Header?
h1 {
text-align: center;
}
/* caixa header */
.headerbox {
padding: 30px;
background: blue;
color: white;
text-align: center;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
body{
background: #396afc; /* fallback for old browsers */
background: -webkit-linear-gradient(to left, #2948ff, #396afc); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to left, #2948ff, #396afc); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>Document</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<!-- Conteúdo -->
<header>
<div class="headerbox">
<h1>Este é o título do site.</h1>
<p1>essa é uma chamada para o site.</p1>
</div>
</header>
<form action="/pagina-processa-dados-do-form" method="post">
<div>
<label for="nome">Nome:</label>
<input type="text" id="nome" />
</div>
<div>
<label for="email">E-mail:</label>
<input type="email" id="email" />
</div>
<div>
<label for="msg">Mensagem:</label>
<textarea id="msg"></textarea>
</div>
</form>
</body>
</html>
Thank you! But I want to put the form out of the box I created, under it. You know how I do it?
– Márcio
I saved there! Check the link again, please.
– Thiago Cunha
Hello. Edit the answer and enter the code here in Sopt. For here is a world for it. Greetings.
– Fabiano Monteiro