css 3

Icon

A comprehensive CSS 3 reference guide, tutorial, and blog
Are you a CSS expert? Want to contribute? Contact us

CSS BORDER

This is a shorthand property which allows an author to specify the border-width, border-style, and border-color for all the borders of an element’s rendering box at once. Unlike the ‘margin’ and ‘padding’ properties, this property cannot specify different values for each side. To do this, use the properties for each side instead (’border-top’, ‘border-right’, ‘border-bottom’ and ‘border-left’.)

 

Example

blockquote { border: medium dashed #ff0000 }

<blockquote style=”border: medium dashed #ff0000″>This is some text</blockquote>

 

Possible Values

Value Description
inherit Explicitly sets the value of this property to that of the parent.
[border-width] Uses a [border-width] value to render the border for an element’s rendering box.
[border-style] Uses a [border-style] value to render the border for an element’s rendering box.
[border-color] Uses a [border-color] value to render the border for an element’s rendering box.

 

3 Responses

  1. Ravi Tom says:

    -moz-border-radius:10px;
    -webkit-border-radius:10px;
    border:1px solid #DBDBDB;
    border-radius:10px;

    its working for mozilla and chrome .. rounded corners..good one

  2. How do you turn off borders aruond images? In firefox I’m seeing inherited borders but not in Internet Explorer 7.

  3. Basava says:

    -moz-border-radius:10px;
    -webkit-border-radius:10px;
    border:1px solid #DBDBDB;
    border-radius:10px;

    its working in mozilla and chrome, rounded corners.
    but its not working in Opera, IE, Safari

Leave a Reply

Pages

Sponsors

$100 PSD to XHTML. CONTACT US FOR MORE INFORMATION


CSS3.com



Please help CSS3.com stay alive and running

Bad Behavior has blocked 974 access attempts in the last 7 days.