<STYLE type="text/css"><!--
@import url(sheet2.css);
H1 {color: maroon;}
BODY {background: yellow;}
--></STYLE>
This should cause older browsers to completely ignore not only the
|
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 |
So let's say that you want to use Zurich for a document, butyou'd like to make use of all those different heaviness levels.(or normal) face because there isn't aMedium face available; thus, it is assigned the same as400. As for the rest, 700 goeswith bold as always, while 800and 900, lacking a heavier face, are assigned tothe Bold font face. Finally, 600 is assigned tothe next-heavier face, which is, of course, the Bold face.
font-weight is inherited, so if you set aparagraph to be bold, then all of its childrena padding for the paragraph that is wide enough to accommodate the positioned element. Also, since it has a transparent background, the parent element's text shows through the positioned element. The only way to avoid this is to set a background for the positioned element.
Note that the boldface element in this case is positioned in relation to its parent element's content box, which defines its containing block. Without the relative positioning of the parent element, the containing block would be another element. Consider a none in your HTML documents.
Well, we talked about a lot of floating behavior, so there's only one more thing to discuss. You won't always want your content to flow past a floated element -- in some cases, you'll specifically want to prevent it.
tags such as these. Therefore, the only reason we createline-height rules for block-level elements is sothat we don't have to explicitly declare aline-height for all its inline elements, fictionalor otherwise.TIP
The fictional LINE element actually clarifies thebehavior that results from setting line-height ona block-level element. According to the