|
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 Consider the example in Figure 9-19. It shows twoparagraphs that contain identical text. However, the first paragraph
|

How is this perfect alignment possible? Remember, when a background is fixed , the origin element is positioned with respect to the canvas. Thus, both background patterns begin tiling from the top left corner of the document, not the individual elements. For the BODY, we can see the entire repeat pattern. For the H1, however, the only place we can see its background is in the padding and content of the H1 itself. Since both background images are the same size, and they have precisely the same origin position, they
Having done this, we need a style declaration that will recreate theeffects of all the tags we just deleted. This should just about dothe trick:
.sidebar .head {font-size: larger; font-weight: bold;text-decoration: underline; color: white;}By using the contextual selector .sidebar.head, we ensure only those