Quick Tip: Using CSS3’s Border-Width Property

Published June 28, 2016 by CSS Newbies.

Most people probably use the shorthand when defining CSS’s border property, which is written as follows:

border: [border-width] [border-style] [border-color]; 

But what some developers may not know is that the border-width property, the first property defined in the CSS shorthand for the border property, takes values other than those defined by px or em. The property also takes keyword values: thin, medium, or thick.

Here’s an example of how to include the keyword values in your code and what it might look like:

border: medium solid #333;

Screen Shot 2016-06-28 at 9.14.01 AM

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>