I'm having trouble with an H1 and a class link inside a div, which does not go up or down the way I want. I've already tried to solve this using margin-top
and margin-bottom
, but I did not get the effect I want. When I use these properties, collapse happens. They come in from an image, inserted via CSS below code:
.container {
width: 980px;
margin: 0 auto;
}
.hero-image {
background: url('http://i.imgur.com/uCRNEAF.jpg');
background-repeat: no-repeat;
padding: 100px;
text-align: center;
margin-top: 1.2em;
}
.hero-image h1 {
font-size: 28px;
font-family: 'Oswald', sans-serif;
text-transform: uppercase;
color: #ffffff;
margin-bottom: 0.5em;
}
/* Button */
.botao {
font-family: 'Oswald', sans-serif;
color: #ffffff;
text-decoration: none;
padding: 5px 10px;
background-color: #1989ca;
font-size: 0.9em;
border-radius: 4px;
}
<div class="container">
<div class="hero-image">
<h1>ESTE É MEU TÍTULO!</h1>
<a href="#botao" class="botao" title="Botão">HISTÓRIA</a>
</div>
</div>