|
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 |
Then, on each page, we simply write an appropriate style. If thehighlighted link should have a yellow background, then on the"Other Links" page, we would add this to the style sheet,leading to the result depicted in Figure 11-20:
TD.links {background: yellow;}
However, on each page, we want the cell containing the current pageto be highlighted in some fashion. This is really easy. All we haveto do is add a class to each table cell, like this:
<TABLE border cellpadding="4"><TR><P STYLE="font-size: 12px; line-height: 12px;">This is text, <EM>some of which is emphasized</EM>, plus other text<BR>which is <B STYLE="font-size: 24px;">boldfaced</B> and which is<BR>larger than the surrounding text.</P>What we have here is a situation where some of the text has afont-size of 12px , while othertext has a size of 24px . However, all of the texthas a line-height of 12px,since line-height is an inherited property. What