I have a div with 3 buttons, with some CSS applyed. (JSFiddle).
I want to delete the blank space between the div border and the buttons. I am new to HTML and CSS, so I guess it has an easy fix.
.navBar {
display: block;
border: 5px solid black;
width: 521.5px;
position: sticky;
margin-left: auto;
margin-right: auto;
top: 2px;
}
.button {
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
cursor: pointer;
background-color: #555555;
transition-duration: 0.4s;
}
<div class="navBar">
<button type="button" class="button">text1</button>
<button type="button" class="button" >text2</button>
<button type="button" class="button">text3</button>
</div>