Sept. 20, 1998

Putting Style Sheets in Perspective

border-width Shorthand

'border-top', 'border-right', 'border-bottom', 'border-left'

Initial Value:
see individual properties
Allowed Values:
<border-[box-side]-width>
border-style
color
inherit
Applies to:
All elements
Inherited?:
no

This is the shorthand for setting the border properties individually. Properties not specified are set to their initial values.

	
.trbl{
  border-left  :
	.2em solid  red;
  border-right:
	.2em solid  red;
  }	

The shorthand for individual border properties is not necessarily reliable in all browsers.



Specify the sides of your box, change colors, or vary the thickness of your border! Group all of the different border properties into one shorthand property. Consider the following two examples... which would you rather type?

.bordershort { 
	border-top	: thin solid blue;
	border-right	: .7em solid red;

	}

.borderlong {
	border-top-width	: thin;
	border-top-style	: solid;
	border-top-color	: blue;
	border-right-width	: .7em;
	border-right-style	: solid;
	border-right-color	: red;
	}

Additional Resources:

Putting Style Sheets in Perspective: border-width
Putting Style Sheets in Perspective: Marginally Speaking
Putting Style Sheets in Perspective: border-property

Up to => Home / Authoring / Style / Sheets / Margins

Guide Keywords Lexicon Site Map Top 100 Tutorials


Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers