|
CSS Tutorials |
CSS TutorialsWelcome to the CSS Tutorials. In this section we cover Cascading Style Sheets, the powerful supplement to HTML that allows you complete control over the look of your websites. We'll show you how to create Cascading Style Sheets, and some of the cool tricks you can achieve with them. |
For Beginners...Introduction to CSS CSS Units For Intermediate Users...Controlling Background Images and Colours Controlling Fonts with CSS Controlling Text Appearance with CSS Making Lists Look Nicer with CSS For Advanced Users...CSS Positioning |
P[class="directions"] {color: red;}P.directions {color: red;}DIV[ID="abc123"] {color: blue;}DIV#abc123 {color: blue;}Obviously, the latter rule in each pair is much simpler to type and
Since the "inherent" line height of 12-point text is 12points, the preceding rule means that there will be an extra 4 pointsof space around each line of text in the paragraph. This extra amountis divided in two, with half going above each line, and the otherhalf below. While there is a distance of 16 points between the lines,this is an indirect result of how the extra space is apportioned.
Now let's look at a slightly more complex case. Take thefollowing example:
on the placement of the background image.