1
body{
background: #EFEFEF;
font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", Verdana, "sans-serif;
}
.create-box{
background: #DF5B5D;
border: 10px dashed #FEFEFE;
max-width: 550px;
min-height: 88px;
text-align: center;
margin: auto;
}
.create-box form{
width: 100%;
text-align: center;
margin: 0 auto;
}
.create-box form input{
display: block;
margin: 5px 10px;
vertical-align: middle;
text-align: center;
font-size: 22px;
font-weight: bold;
color: #43A8C7;
}
<!DOCTYPE html>
<html>
<head>
<title>Trash [coder]</title>
<meta charset="utf-8" />
</head>
<body>
<div class="create-box">
<form>
<input type="text" id="titulo" placeholder="Digite o título" />
<input type="text" id="conteudo" placeholder="Digite o conteúdo" />
<input type="submit" value="Criar Boxer's" />
</form>
</div>
</body>
</html>
Why can’t I center the form in the DIV? what’s wrong? solution?
Because it occupies the whole width of the div.
– bfavaretto
If I remove or change the width of . Crate-box, it also does not position..
– user106463