I can make a single CSS dashed border, as shown below, but how would the top and side borders be made?
Yes, border: dashed
would do it, but the problem is that the dash renders differently in Chrome, IE, FF, etc., so I am in search of a universal cross-browser style declaration with control over dash thickness, as well as spacing and length, and started out below with one border.
HTML:
<div class="box"></div>
CSS:
.box {
height:95px;
margin-top:6px;
padding-top:10px;
}
.box:hover {
color:#2200dd;
height:101px;
margin-top:0px;
background: linear-gradient(to right, currentColor 0%, currentColor 50%, transparent 50%, transparent 100%) repeat-x left top, left bottom;
background-size: 60px 6px;
}