Your Search Results



    The border-top-width CSS property sets the width of the top border of a box.


    /* Any <length> value */
    border-top-width: 10em;
    border-top-width: 3vmax;
    border-top-width: 6px;
    /* A keyword */
    border-top-width: thin;
    border-top-width: medium;
    border-top-width: thick;
    border-top-width: inherit;


    Is either a non-negative explicit <length> value or a keyword denoting the thickness of the bottom border. The keyword must be one of the following values:
    A thin border
    A medium border
    A thick border
    The specification doesn't precisely define the thickness of each of the keywords, which is therefore implementation specific. Nevertheless, it requests that the thickness does follow the thin ≤ medium ≤ thick inequality and that the values are constant on a single document.
    Represents the calculated value of the border-top-width of the parent's element.

    Formal syntax


    <br-width> = <length> | thin | medium | thick


    element { 
        border-top-width: thin;
        border-top-style: solid;
        border-top-color: #000;
    	border-top: thick solid red;
    	border-top: medium solid orange;
    	border-top: thin solid green;

    Live Sample

    Element 1
    Element 2
    Element 3


    Specification Status Comment
    CSS Backgrounds and Borders Module Level 3
    The definition of 'border-top-width' in that specification.
    Candidate Recommendation No significant change.
    CSS Level 2 (Revision 1)
    The definition of 'border-top-width' in that specification.
    Recommendation Initial definition.

    Browser compatibility

    Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
    Basic support 1.0 1.0 (1.0) 4.0 3.5 1.0 (85)
    Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
    Basic support ? ? ? ? ?

    See also

    Document Tags and Contributors

    Last updated by: Sebastianz,