3

We have the following code: http://jsfiddle.net/Z92Qp/

As you can see the green line that appear on mouse hover is "oblique" on the right side. see the image

Is that a bug of the browsers?

Thanks in advance

Blowsie
  • 40,239
  • 15
  • 88
  • 108

4 Answers4

2

No, borders are designed that way, to meet half way as seen here

CalabiYau
  • 471
  • 2
  • 9
2

This is not a bug its how the browsers choose to render the border.

See this example I mocked up. http://jsfiddle.net/blowsie/Uss7X/

enter image description here

Blowsie
  • 40,239
  • 15
  • 88
  • 108
1

Hey now used to box shadow as like this

li:hover {
                box-shadow: 0 4px 0 0 #00FF00;
    -webkit-box-shadow: 0 4px 0 0 #00FF00;
    -moz-box-shadow: 0 4px 0 0 #00FF00;

            }

Live demo

Rohit Azad Malik
  • 31,410
  • 17
  • 69
  • 97
0

CSS borders are drawn with diagonal corners.

Otherwise, if you had 2 different colours for bottom and right (blue & red for e.g), what would happen in the corner? Would it be all red, or all blue?

This is well known, and is even exploited to make CSS Triangles

Curtis
  • 101,612
  • 66
  • 270
  • 352