Professional Documents
Culture Documents
CSS Table Dan Outline
CSS Table Dan Outline
Basic
Ken Ratri
1 2019
Objectives
Box Model
Outline
Table
List
2 2019
Box Model
3 2019
Box Model
4 2019
Box Model
5 2019
Example
6 2019
Outlines
7 2019
Value Description
outline-color Specifies the color of the outline
outline-style Specifies the style of the outline
outline-width Specifies the width of outline
Specifies that the value of the outline property
inherit
should be inherited from the parent element
8 2019
Outline Style
o The outline-style property specifies the style of the outline.
o The outline-style property can have one of the following values:
• dotted - Defines a dotted outline
• dashed - Defines a dashed outline
• solid - Defines a solid outline
• double - Defines a double outline
• groove - Defines a 3D grooved outline. The effect depends on the
outline-color value
• ridge - Defines a 3D ridged outline. The effect depends on the
outline-color value
• inset - Defines a 3D inset outline. The effect depends on the outline-
color value
• outset - Defines a 3D outset outline. The effect depends on the
outline-color value
• none - Defines no outline
• hidden - Defines a hidden outline
9 2019
Outline Color
The outline-color property is used to set the color of the
outline.
The color can be set by:
o name - specify a color name, like "red"
o RGB - specify a RGB value, like "rgb(255,0,0)"
o Hex - specify a hex value, like "#ff0000"
10 2019
Outline Width
11 2019
Outline - Shorthand property
To shorten the code, it is also possible to specify all the
individual outline properties in one property.
The outline property is a shorthand property for the following
individual outline properties:
12 2019
Table
To specify table borders in CSS, use the border property.
The example below specifies a black border for table, th, and td
elements:
Notice that the table in the example above has double borders. This is
because both the table and the th/td elements have separate borders.
13 2019
Table
14 2019
Table Width and Height
15 2019
Table aligment
td
{
text-align:right;
height:50px;
vertical-align:bottom;
padding:15px;
}
16 2019
Table Color
table, td, th
{
border:1px solid green;
}
th
{
background-color:green;
color:white;
}
17 2019
Add the border-bottom property to <th> and <td> for horizontal
dividers:
18 2019
List
The CSS list properties allow you to:
1. Set different list item markers for ordered lists
2. Set different list item markers for unordered lists
3. Set an image as the list item marker
19 2019
When using the shorthand property, the order of the
values are:
Value Description
list-style-type Specifies the type of list-item marker.
list-style-position Specifies where to place the list-item marker.
list-style-image Specifies the type of list-item marker.
20 2019
list-style-type Property
21 2019
list-style Property
ul#myList
{
list-style-image:url('sqpurple.gif');
}
22 2019
list-style-image Property
ul
{
list-style-image:url('sqpurple.gif');
}
23 2019
list-style-image Property
Value Description
24 2019
list-style-position Property
Value Description
Indents the marker and the text. The bullets appear inside the
inside
content flow
Keeps the marker to the left of the text. The bullets appears
outside
outside the content flow. This is default
25 2019
ul#myList
{
list-style-position:outside;
}
ul#myList
{
list-style-position:inside;
}
26 2019