In the last article, we learned about CSS box model in detail and was really very easy concept due to the fact that we have studied padding and margin in detail.
In the CSS box model main parts are:
- Content
- padding
- border
- margin
This all are parts of element's height and width. There is one more element associated with the element known as the outline.
Let's study it in detail...
CSS Outline
An outline is a line which is used to make element "stand out" outside the borders.
If you look at above image carefully, you will notice that border and outline are two completely different concepts. Borders are part of height and width of the element while on the other hand outline is not the part of element's dimensions.
Outline Style
The outline-style property specifies the kind or style of the outline. Following values can be used:
- dotted: Defines a dotted outline
- dashed: Defines a dashed outline
- solid: Defines a solid outline
- double: Defines a double outline
- groove: 3D grooved outline
- ridge: 3D ridge outline
- inset: 3D inset outline
- outset: 3D outset outline
- none: No outline
- hidden: Hidden outline
Outline Color
The outline-color property is used to set the color of the outline. I need not tell more about this as we have discussed the lot about colors in previous posts.
Other important properties:
- outline-width
- outline shortcut property
That's all for today. In the next part, we are going to see how we can customise actual text in our web pages using CSS.
Till then #keepCoding.
Comments
Post a Comment