Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
htmlbook.ru/css/border-bottom
https://jsfiddle.net/QW01_01/sgdw2ac2/
Here is a solution I use on one of the projects
Underline from the center when hovering with the mouse
a.linkmenucategory {
display: inline-block;
color: #000000;
line-height: 2;
text-decoration: none;
cursor: pointer;
position: relative;
}
a.linkmenucategory:after {
display: block;
content: "";
background-color: #006633;
height: 4px;
width: 0%
left: 50%
position: absolute;
-webkit-transition: width .2s ease-in-out;
-moz--transition: width .2s ease-in-out;
transition: width .2s ease-in-out;
-webkit-transform: translateX(-50%);
-moz-transform: translateX(-50%);
transform: translateX(-50%);
}
a.linkmenucategory:hover:after,
a.linkmenucategory:focus:after {
width: 100%;
}
May come in handy.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question