CSS: how to make a two-colored border

Tutoring web front-end, there are so many little gadgets that CSS offers. The tutor looks at the outline property.

In CSS, you can accomplish a dotted border with two different colors using a combination of the border and outline properties.

Look at me!

The div above has border set to solid and yellow, while outline is set to dotted and black. The outline-offset is the negative of the border-width, so it sits atop the border.

Source:

w3schools.com

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Leave a Reply