If you have come here directly, I recommend you to read the first part of this tutorial here.
Font:
Font property has a number of sub properties like:
- font-style: normal
- font-variant: normal
- font-weight: normal
- font-size: inherit
- line-height: normal
- font-family: inherit
You can give values for all these properties just within a single property named “font”. A simple example of it is given here:
Here we use implicit specifications of font properties as given in the list above.
Border:
You may have used borders many time, but from now on you are going to use it in short version. Let’s see the available border properties.
- border-width
- border-style
- border-color
There are no default values for border properties, so you have to specify every property to make the border visible. We can see a sample code here:
This will create a continuous black border of 2px width. If you wish to use different widths for youe borders you can use the following code:
Here we use a shorthand version of specifying widths. We use a clockwise representation of border widths.
Here the “Top border” width is specified first, then “Right border” width, “Bottom border” width followed by “Left border” width. Let’s call this a “CSS Clock” to make it easy to remember.
This type of representation is used everywhere in CSS when it comes to representing properties that has top, right,bottom and left regions.
I am stopping this part right here to give you some break. The third part will be released in next few days.
