Alrighty, so I'm using this to make myself a header when a user hovers over the tab it'll show a line. I'm trying to do this without it changing the size when a user hovers over it. I want a line to appear but nothing else should happen.
Here is a fiddle, Fiddle
HTML:
<div class="header">
<div class="header-tab">
<div class="center-vertical">
Main
</div>
</div>
</div>
CSS
.header-tab{
height:100%;
display:inline-block;
padding:0 1vw 0 1vw;
text-transform:uppercase;
font-weight:450;
color:white;
}
.header-tab:hover{
color:#ff704d;
background:gray;
box-sizing: border-box;
border-bottom:3px solid #ff704d;
}
.center-vertical{
position: relative;
top: 50%;
transform: translateY(-50%);
-webkit-transform: translateY(-50%);
}
.header{
height:5vw;
background:black;
}
body{
margin:0;
}
I think that it's because of the vertical center, but I'm quite unsure. Thanks!
Edit: I don't want it to like, jump up.