TRBL
-
top
right
bottom
left
- Or, clockwise
Hello World
CSS
.trbl_4 {
border-style: solid;
border-width: 2em;
border-color: red green blue black;
}
full css selector
.trbl_4 {
width: 10%;
height: 3em;
text-align: center;
border-style: solid;
border-width: 2em;
border-color: red green blue black;
display: table-cell;
vertical-align: middle;
}
-
top
-(left,right
)-bottom
-
mnemonic:
left
, right
step together
- (Step together boldly tread)
Hello World
CSS
.t_lr_b_3 {
border-style: solid;
border-width: 2em;
border-color: red green blue;
}
full CSS selector
.t_lr_b_3 {
width: 20%;
height: 3em;
text-align: center;
border-style: solid;
border-width: 2em;
border-color: red green blue;
display: table-cell;
vertical-align: middle;
}
-
(
top,bottom
)–(left,right
)
- But note that (
table
) border-spacing
behaves
as
(left,right
)–(top,bottom
)
Hello World
CSS
.tb_lr_2 {
border-style: solid;
border-width: 2em;
border-color: red blue;
}
full css selector
.tb_lr_2 {
width: 20%;
height: 3em;
text-align: center;
border-style: solid;
border-width: 2em;
border-color: red blue;
display: table-cell;
vertical-align: middle;
}
(table)
border-spacing
behaves
as
(left,right
)–(top,bottom
)
when 2 CSS properties are given
CSS
.t_bs,
.t_bs th,
.t_bs td {
border: 1px solid green;
border-spacing: 1px 30px;
}