CSS3 > Borders

Border Property in CSS3

How to set all the border properties in one declaration in CSS3?


By using border property we can set all the border properties in one declaration.

<style>
        p {
            border: brown dotted thin;
        }

        div {
            border: green dashed thick;
        }
</style>

<body>
    <p>
        TechFunda.com
    </p>
    <div>
        DotNetFunda.com
    </div>
</body>

In the above code snippet we have given border property with different styles to the <p> element and <div> element. border property with the value "brown dotted thin" gives the brown color thin dotted border and the value "green dashed thin" gives the green color thin dashed lines. 

OUTPUT

 Views: 3321 | Post Order: 73



Write for us






Hosting Recommendations