Page 104 - DCAP408_WEB_PROGRAMMING
P. 104
Web Programming
Notes To shorten the code, it is also possible to specify all the border properties in one property. This
is called a shorthand property.
The shorthand property for the border properties is "border":
When using the border property, the order of the values are:
border-width
border-style
border-color
It does not matter if one of the values above are missing (although, border-style is required), as
long as the rest are in the specified order.
Example: How to set all the border properties in one declarartion
<html>
<head>
<style type="text/css">
p{border:5px solid red;}
</style>
</head>
<body>
<p>This is some text in a paragraph.</p>
</body>
</html>
Result:
There is some text in a paragraph
BORDER
border-width
border border-stye
border-color
border-bottom-width
border-bottom border-style
border-color
border-bottom-color border-color
border-bottom-style border-style
thin | medium | thick
border-bottom-width
length
border-color color
border-left-width
border-left border-style
border-color
border-left-color border-color
border-left-style border-style
thin | medium | thick
border-left-width
length
98 LOVELY PROFESSIONAL UNIVERSITY