If I use flex
to position my links, the padding doesn't seem to work for padding-top
.
Here is an example:
html
<div class="container">
<p>title</p>
<div>
<a href="#">Link 1</a>
<a href="#">Link 2</a>
</div>
</div>
css
body {
margin: 0;
}
.container {
display: flex;
justify-content: space-between;
}
.container a {
padding: 15px;
background: #e23311;
}
And here is a jsfiddle.
How can I fix this so that the padding applies to the top of the links as well?