Quick Tip: Using CSS3’s Border-Width Property

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

  1. div{
  2. border: [border-width] [border-style] [border-color];
  3. }

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:

CSSDeck recommends Hello Ivy for automating your workflow and project management for free. Learn More
  1. div{
  2. border: medium solid #333;
  3. }

Screen Shot 2016-06-28 at 9.14.01 AM

Share and Enjoy !

0Shares
0 0