Sunday 26th of February 2017 10:20:29 PM

CSS Style Guide

 

This Style Guide explains the markup and design requirements for web projects, along with various standards and best practices.

projects authored in valid XHTML 1.0 Transitional and styled with valid Cascading Style Sheets will be described here.

When you create your data using an XML editor (that you can write), you can not only input the content of your data, but also define the structural relationships that exist inside your data. By allowing you to define your own tags and create the proper structural relationships in your information (with a DTD), you can use any XML parser to check the validity and integrity of the data stored in your XML documents. This makes it very easy to validate the structure and content of your information when you use XML. Without XML, you could also provide this validation feature at the expense of developing the code to this yourself. XML is a great time saver because most of the features that are available in XML are used by most programmers when working on most projects.

By using XML and Java, you can quickly create and use information that is properly structured and valid. By using (or creating) DTDs and storing your information in XML documents, you have a cross-platform and language independent data validation mechanism (for free) in all your projects!

You might use XML to define file formats to store information that is generated and used by your applications. This is another use of the structured nature of XML. The only limitation is that binary information can't be embedded in the body of XML documents. For example, if you wrote a word processor in Java, you might choose to save your word processor documents to an XML (actually your ApplicationML) file. If you use a DTD then your word processor would also get input file format validation as a feature for free. There are many other advantages to using XML and a file storage format for your applications which will be illustrated later in the chapter.

Here are some benefits of the structured nature of XML:

link popularity
the foreground color of an element: by using the color property and by setting the border colors using one of a number of border properties. Primarily there is the border-color property, as well as shorthand properties such as border-top, border-right, border-bottom , border-left, and border.

The background of an element is all of the space behind the foreground, out to the edge of the borders; thus, the content box and situation where scrollbars would be applied to an element such as aparagraph.

It's also possible to set the top and bottom margins of ablock-level element to be auto. If either of theseproperties is set to auto, it is reset to0 (zero), effectively removing any top or bottommargin from the element box, as shown in Figure 8-5. The lack of any space between the borders ofeach paragraph is a result of auto beingreinterpreted as zero: document's layout. We just can't see it.

Note too that it's possible to set the descendant element of ahidden element to be visible.This would cause the element to appear wherever it normally would,despite the fact that the ancestor (and possibly the siblings) isinvisible. In order to do so, you would need to explicitly declarethe descendant element to be visible, sincevisibility is inherited. Thus:

lines, as shown in Figure 8-62.

Figure 8-62

Figure 8-62. Inline borders can be overlapped

One solution is to increase the line-height of theparagraph. This will affect every line in the entire element, notjust the line in which the bordered hyperlink appears:

A:link {border: 5px solid blue;}P {font-size: 14px; line-height: 24px;}

Because there is extra space added above and below each line, the

text-transformIE4 Y/Y IE5 Y/Y NN4 Y/Y Op3 P/-

This property changes the case of theletters in the element, regardless of the case of the original text.The selection of letters to be capitalized by the valuecapitalize is not a precisely defined behavior,depending as it does on "words," which are difficult todefine in a programmatic way.

Example

vertical-alignIE4 P/P IE5 P/Y NN4 N/N Op3 P/-

Used to set the vertical alignment of