UPDATE:
Having seen that the line in the message is actually a two-color line, you can use the border-image property to achieve a similar effect (the example shows only the principle, but is not configured for perfect correspondence):

ONLINE DEMO
CSS
div { border-top:0; border-bottom:1px; -webkit-border-image: -webkit-gradient(linear, left bottom, right bottom, from(#07f), to(#000), color-stop(0.3, #07f), color-stop(0.31, #000)) 21 20 30 21; }
For other browsers:
-moz-border-image: -webkit-border-image: -o-border-image: border-image:
Note that the gradient setting changes from browser to browser, which is apparently why you need to configure it as well. The provided demo will only work with web browsers.
Old
You mean something like this:

You can use the following CSS for this:
.myClass { height:40px; width:60px; border:5px solid #00a; box-shadow:0 0 0 5px #f00 inset; padding:5px; }
Here box.shadow, set to insert without blur, acts as the second part of the border. Indentation should prevent overlapping content.
ONLINE DEMO
source share