|
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 {margin-left: 100px; margin-right: 100px;} /* same as before */WARNING
In practice, only browsers released in early 1999 or later correctlyhandle auto, and not even all of them get itright. Those that do not handle auto marginscorrectly will behave in inconsistent ways, but the safest bet is toassume that they will set both margins to zero. The browsers that doget this right are Internet Explorer 4.5 and 5 for Macintosh, andOpera 3.6.

Let's suppose a paragraph has margins, a background color, anda border style set as shown in Figure 7-37:
P {margin: 5px; background-color: silver; border-style: solid;}XML documents may be stored in files or databases. When stored in files, XML documents are simply plain text files with tags (and possibly DTDs). It is very easy to save your XML documents to a text file and pass the text file around to other machines, platforms and programs (as long as they can understand the data). In the worst case scenario, XML documents (files) can be viewed in a text editor on just about any platform.
XML documents are also naturally committed to a database (relational or object) or any other kind of XML document store. There are commercial products available which allow you to save XML documents to an XML storage layer (which is not a database per se), like Datachannel's XStore and ODI's eXcelon. These XML store solutions are quite expensive ($10,000 to $20,000 range).
P {margin-left: 5em; position: relative;}<P> Lorem ipsum, dolor sit amet, consectetuer adipiscing elit,sed diam nonummy nibh euismod tincidunt ut <SPAN CLASS="change">***</SPAN>laoreet dolore magna aliquam erat volutpat.</P>
Remember when we mentioned static-position muchearlier in the chapter? Here's one example of how it works andhow it can be very useful.
Another important point is that when an element is positioned, it <LINK REL="stylesheet" TYPE="text/css" HREF="link-styles.css"TITLE="Linked"><STYLE TYPE="text/css">@import url(import-styles.css);</STYLE>
Because Explorer will read in both style sheets, it will use thecascade to determine which rules should actually be applied. Ifyou've ordered things correctly, and the imported style sheetcomes after the linked style sheet, its rules will win out over therules in the linked style sheet.