Reputation: 8530
When overriding the size of the border-bottom
in a div
that already has a 1px border, Firefox and Chrome render the border-left
and border-right
incorrectly:
<div></div>
div{
width: 300px;
height: 200px;
border: 1px solid #9fd;
border-bottom: 50px solid #333;
}
jsFiddle link: http://jsfiddle.net/azSrQ/
The left and right border always stop halfway down the border-bottom
in the latest Chrome and Firefox. I couldn't find any reports of this in Bugzilla or Chromium's issues page.
Is there a workaround?
Upvotes: 1
Views: 797
Reputation: 35064
Per spec, this should give a sloped gradient from one border width to the other. But when one of the widths is only 1px, that generates to the thing you see above....
Upvotes: 1
Reputation: 21114
That's weird i guess. Or maybe it's the default behaviour? They stop exactly at 50% of the bottom border.
Anyway, here's a method to emulate it:
div:after {
content:".";
color:#333;
position:absolute;
bottom:-50px; left:-1px; right:-1px;
line-height:25px;
border-left:1px solid #9fd; border-right:1px solid #9fd;
}
Tested and working on latest Chrome and Safari, little issue with FF (win)
Upvotes: 1