This page will focus specifically on Font Sizes.
When writing a blog, you can either use the websites default settings.
OR, you may implement a CSS code which changes the size of your text.
In our case, we'll try different sizes of our links.
We'll begin with The original list (using HTML).
This is not using any CSS Class selector or enhancements.
- - - - - - - - - - -
example 1
We'll create a slightly larger size of the links.
(let's choose a 17px font size).
the class="font17" is added to each and every link.
THEN,
Code must also be added within the CSS.
(the .font17 in the CSS is the same name as class="font17" within the HTML link).
NOTICE:
a complete code is often used to identify all features. But, we won't do that here.
.font17:link /* a normal, unvisited link */
.font17:visited /* a link the user has visited */
.font17:hover /* a link when the user mouses over it */
.font17:active /* a link the moment it is clicked */
- - - - - - - - - - -
example 2
creating a large Font-size of 22px
(Our chosen class="too-large-font" is added to each and every link).
THEN,
Code must also be added within the CSS.
(C)
Needless to say:
(the .too-large-font Classname in the CSS is the same name as class="too-large-font" within the HTML link).
(D)
NOTICE: (for future reference) -
a complete CSS code sequence is often used to identify all features.
But, we won't do that here.
.too-large-font:link {font-size:22px } /* a normal, unvisited link */
.too-large-font:visited {add code here } /* a link the user has visited */
.too-large-font:hover {add code here } /* a link when the user mouses over it */
.too-large-font:active {add code here } /* a link the moment it is clicked */
- - - - - - - - - - -
example 3
a font size of 19px
(Our chosen class="norsewolf" is added to each and every link).
THEN,
Code must also be added within the CSS.
(C)
NOTICE -You'll notice that I'm using .norsewolf:link {font-size:19px;} in the above CSS.
While in other examples, we use .norsewolf {font-size:19px;}
They both perform the same basic function.
(D)
Needless to say:
(the .norsewolf Classname in the CSS is the same name as class="norsewolf" within the HTML link).
(E)
NOTICE: (for future reference) -
a complete CSS code sequence is often used to identify all features.
But, we won't do that here.
.norsewolf:link {font-size:19px } /* a normal, unvisited link */
.norsewolf:visited {add code here} /* a link the user has visited */
.norsewolf:hover {add code here} /* a link when the user mouses over it */
.norsewolf:active {add code here} /* a link the moment it is clicked */
- - - - - - - - - - -
example 4
percentages in fonts (such as 90%, or 130%, etc).
this example will choose 110%.
- - - - - - - - - - -
example 5
font-size:medium;
- - - - - - - - - - -
example 6 (using em measuring).
font-size:1.13em
- - - - - - - - - - -
example 7
Links can be different sizes, if desired.
No comments:
Post a Comment