I need to create a solid color inset border. This is the bit of CSS I\'m using:
border: 10px inset rgba(51,153,0,0.65);
Unfortunately that cr
To produce a border inset within an element the only solution I've found (and I've tried all the suggestions in this thread to no avail) is to use a pseudo-element such as :before
E.g.
.has-inset-border:before {
content: "foo"; /* you need something or it will be invisible at least on Chrome */
color: transparent;
position: absolute;
left: 10px;
right: 10px;
top: 10px;
bottom: 10px;
border: 4px dashed red;
}
The box-sizing property won't work, as the border always ends up outside everything.
The box-shadow options has the dual disadvantages of not really working and not being supported as widely (and costing more CPU cycles to render, if you care).