1. Computing & Technology

Discuss in my forum

border

By , About.com Guide

border Description:

The border property is a shorthand style property that defines all the border style properties of an element. It sets the border width, color, and style for all four borders.

border in CSS Versions:

border Syntax:

border: [ <border-width> || <border-style> || <color> ] | inherit

border Initial Value:

Not defined for shorthand properties.

border Applies To:

All elements.

border Inheritance:

This property is not inherited.

border Browser Support:

border Examples:

standard border

<p style="border : 2em solid #c00;">This paragraph has a 2 em solid red border.</p>

border Special Notes:

  • If you omit the color value, the color will be the same as the color value for the element.

More border Information:

©2012 About.com. All rights reserved.

A part of The New York Times Company.