|
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 |
This selector will match any paragraph whose lang attribute has the value en, en-US, en-UK, en-Cockney, and so on.
In fact, this can be used to match any value with a similar format. For example, if you have images with ALT text of fig-1, fig-2, fig-3, and so on, and want to match any of them, you could use this selector:
Figure 7-43 shows us varying shades of gray forborders. Thanks to the grayscale nature of this book, I've beensticking mostly to shades of gray, but any color could be used. Ifyou wanted an H1 with a red, green, blue, andyellow border, it's this easy:
As previously discussed, if no colors are defined, then the defaultcolor is the foreground color of the element. Thus, the followingdeclaration will be displayed as shown in Figure 7-44:
taken up by the borders may shift portions of the line over a bit, which may in turn change which word is at the end of the line. Turn to Figure 7-54 to see what happens when an inline element with a border is displayed across multiple lines:B {border: 3px solid gray; background: silver;}

In Figure 7-54, the left border is applied to the beginning of the element, and the right border to the end of it. Borders are not necessarily applied in this