Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

border-bottom bug in Microsoft Edge

In Microsoft Edge browser after hovering an element border-bottom set the color of the bottom element. Bug? Look at jsfiddle: https://jsfiddle.net/Experimenter/65eLh89r/

a{
    display: block;
    background: blue;
    padding: 10px 30px;
    color: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid gray;
}
a:hover{
    color: white;
}
<ul>
    <li><a href="#">1</a></li>
    <li><a href="#">2</a></li>
    <li><a href="#">3</a></li>
    <li><a href="#">4</a></li>
    <li><a href="#">5</a></li>
    <li><a href="#">6</a></li>
    <li><a href="#">7</a></li>
    <li><a href="#">8</a></li>
    <li><a href="#">9</a></li>
    <li><a href="#">0</a></li>
</ul>
like image 860
Experimenter Avatar asked Aug 31 '15 14:08

Experimenter


People also ask

How do I remove bottom border default?

Add a border-bottom-style: none; to your CSS to remove this style from the bottom only.

How do you control border bottom width?

The border-bottom-width property sets the width of an element's bottom border. Note: Always declare the border-style or the border-bottom-style property before the border-bottom-width property. An element must have borders before you can change the width.


2 Answers

Had the same issue and created kind of a hack or workaround this bug. What worked for me was to use margin-bottom: -1px; and border-bottom: 2px solid gray;

so mentioned example would look like:

a{
    display: block;
    background: blue;
    padding: 10px 30px;
    color: rgba(255, 255, 255, 0.5);
    border-bottom: 2px solid gray;
    margin-bottom: -1px;
}
a:hover{
    color: white;
}
like image 64
UM404 Avatar answered Oct 11 '22 09:10

UM404


Had the same problem. It appears if the height or width is dynamic and has not a rounded pixel size. As solution example: Change the height to 40px (or what else) and the hover effect works.

But Microsoft should really fix this "designbug" asap... May Edge is fast, but the rendering is not perfect!

like image 29
rjgamer Avatar answered Oct 11 '22 09:10

rjgamer