CSS Border rendering
You could use CSS pseudo-content to achieve a fake border, like this:
.red-mark:before {
content: '';
display:block;
width: 15px;
position: absolute;
top: -15px;
left: -15px;
bottom: -15px;
background: red;
}
See: http://jsfiddle.net/MnPka/1/
The minus positions are because 0 starts within the border. You may be able to change this behaviour by setting box-sizing
though support for that isn't that great yet - http://caniuse.com/#search=box-sizing
CSS: How to control the render order of borders?
Stacking without the z-index property | MDN
When the z-index property is not specified on any element, elements
are stacked in the following order (from bottom to top):
- The background and borders of the root element Descendant
- non-positioned blocks, in order of appearance in the HTML Descendant
- positioned elements, in order of appearance in the HTML
Short answer is:
.nav-tabs {
position: relative;
...
}
Related examples:
.a { height: 20px; background: pink; margin-bottom: -10px;}
.b { height: 40px; border: 10px solid gray;}
.relative { position: relative;}
.z-index { z-index: 1;}
<h3>Example 1: all default</h3><div class="a"></div><div class="b"></div>
<h3>Example 2: 1st position: relative</h3><div class="a relative"></div><div class="b"></div>
<h3>Example 3: both position: relative</h3><div class="a relative"></div><div class="b relative"></div>
<h3>Example 4: both position: relative + 1st z-index: 1</h3><div class="a relative z-index"></div><div class="b relative"></div>
CSS border-right doesn't rendering correctly
As mentioned, the problem is the bottom border overlaping the right one. So, a possible solution is to "fake" a border using :after
pseudo, placing it at the right of the element:
Updated JSFIDDLE
.border {
position: relative;
}
.border:after {
position: absolute;
right: 0;
top: 0;
height: 100%;
width: 4px;
background: black;
content: "\00a0"; /* invisible content */
}
Firefox border rendering css arrow bug
Use translateZ(1px)
with rotate property value
transform:translateZ(1px) rotate(-45deg)
Related Topics
CSS Targetting The Last of a Class Type That Isn't The Last-Child
How to Set Bootstrap Col for Small Display Sizes
Turn Off Alt Tags on Links with CSS
Is There a Cross-Browser Way to Condense Text on a Page
Image Downscaling with CSS … Images Are Blurry in Several Browsers
CSS: Checked - Change <Td> Background
Why Use Media Query Type "All" When It's Implied
When Printing Page Table Rows/Cells Gets Split on Page Break
CSS Media Queries for Print Paper Size
CSS: Table and Table-Cell Replacement for Ie7
:After,: Before Issues in Internet Explorer 11
Fullwidth and Multiple Columns Using Flexbox
Style Dojox Grid Row Depending on Data
Ie Conditional Comments with SASS and Bourbon