<p style="border-width:1px;border-style:solid;border-color:blue;">This text has border styles applied using the border-width, border-style, and border-color properties.</p>
This text has border styles applied using the border-width, border-style, and border-color properties.
Border Styles
Borders can have the following styles.
<p style="border:4px solid blue;">This text has a border style of 'solid'.</p> <p style="border:4px dotted blue;">This text has a border style of 'dotted'.</p> <p style="border:4px dashed blue;">This text has a border style of 'dashed'.</p> <p style="border:4px double blue;">This text has a border style of 'double'.</p> <p style="border:4px groove blue;">This text has a border style of 'groove'.</p> <p style="border:4px ridge blue;">This text has a border style of 'ridge'.</p> <p style="border:4px inset blue;">This text has a border style of 'inset'.</p> <p style="border:4px outset blue;">This text has a border style of 'outset'.</p> <p style="border:4px hidden blue;">This text has a border style of 'hidden'.</p>
This results in:
This text has a border style of 'solid'.
This text has a border style of 'dotted'.
This text has a border style of 'dashed'.
This text has a border style of 'double'.
This text has a border style of 'groove'.
This text has a border style of 'ridge'.
This text has a border style of 'inset'.
This text has a border style of 'outset'.
A keretek variációi
If you don't want the border settings to be applied to all four sides, or if you want each side to have different styles applied, you can use the following properties:
Explicit Properties
- border-bottom-color
- border-bottom-style
- border-bottom-width
- border-left-color
- border-left-style
- border-left-width
- border-right-color
- border-right-style
- border-right-width
- border-top-color
- border-top-style
- border-top-width
Example:
<p style="border-bottom-width:4px;border-bottom-style:double;border-bottom-color:blue;">This text has a bottom border.</p>
This results in:
This text has a bottom border.
Shorthand Properties
The following properties provide you with a more concise way of specifying font properties for each side.
- border-bottom
- border-left
- border-right
- border-top
Example:
<p style="border-bottom:4px double blue;">This text has a bottom border.</p>
This results in:
This text has a bottom border.
Utolsó kommentek