Saturday 22nd of October 2016 09:00:00 AM

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. See the XHTML and CSS sections below for details. Additional sections of this Style Guide, coming soon, will provide information on writing for the web, naming and filing your documents, and other useful topics and guidelines.

XHTML: Guidelines & Benefits

Library projects must be authored in structural XHTML 1.0 Transitional. Page authors should follow accessibility guidelines in compliance with U.S. Law, and so that our site’s content will be made available to the widest possible number of people, browsers, and Internet devices. In addition, all XHTML must validate.

XHTML Guidelines
The rules of XHTML as compared to HTML—an easy transition
What is XML?
A brief introduction to the foundation of XHTML
XHTML Benefits
Four key benefits of converting from HTML to XHTML
XHTML Authoring Tips & Tools
Simplifying the work process—includes tips on thinking structurally, and tools for hand-coders and Dreamweaver users
XHTML Accessibility Tips
Making sure your pages can be read by all visitors, browsers, and devices
XHTML Validation
Ensuring interoperability by avoiding errors and sticking to standards

CSS: Style Sheets & Tips

Library projects must use valid Cascading Style Sheets (CSS) to control typography, color, and other layout elements. Style Sheets must be linked in a way that accommodates the capabilities of new and old browsers.

CSS Guidelines
Tips on authoring and linking to Style Sheets
Steal These Style Sheets!
Style Sheets for your use in Library projects
CSS Validation
/*   assume only two faces for this example: 'Regular' and 'Bold'   */P {font-weight: 100;}   /* looks the same as 'normal' text */P SPAN {font-weight: 400;}   /* so does this */STRONG {font-weight: bolder;}   /* bolder than its parent */STRONG B {font-weight: bolder;}   /* bolder still */<P>This paragraph contains elements of increasing weight: there is an<SPAN>SPAN element which contains a <STRONG>strongly emphasizedelement, and that contains a <B>boldface element</B></STRONG></SPAN>.</P>
Ensuring that your Style Sheets are error-free (same as XHTML validation)

A number of valid Style Sheets have been provided for your use. If you wish to create your own Style Sheets, please discuss your requirements with the Branch Library’s Web Coordinator.

link popularity

In the meantime, however, here's the script:

<SCRIPT LANGUAGE="JavaScript1.2"><!--var agt = navigator.userAgent.toLowerCase(  );var is_major = parseInt(navigator.appVersion);var is_nav = ((agt.indexOf('mozilla') != -1) &&(agt.indexOf('spoofer') == -1) &&(agt.indexOf('compatible') == -1));var is_nav4 = (is_nav && (is_major == 4));
Figure 7-83

Figure 7-83. Providing fallbacks for unusable images

The other thing you can do with list-style-image is set it to the default value of none. This is good practice because list-style-image is inherited -- so any nested lists will pick up the image as the bullet, unless you prevent this from happening:

UL {list-style-image: url(ohio.gif); list-style-type: square;}
UL UL {list-style-image: none;}

Since the nested list inherits the item type matter how tall it is, doesn't actually cause the line-height to increase. What is increased is the height of the line box. Therefore, if a line's height is 14px, and an element within that line is vertically aligned to 50%, and within that same line, there is an image 50 pixels tall, you get the result shown in Figure 4-42:

SUP {vertical-align: 50%;}
Figure 4-42

Figure 4-42. Vertical alignment with a percentage and a tall image