12.09.2015 Views

Boot Camp

Web Authoring Boot Camp - StudioBast

Web Authoring Boot Camp - StudioBast

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Web Authoring <strong>Boot</strong> <strong>Camp</strong><br />

nized by other designers and the W3C as being a once-used item, and will be edited that<br />

way. Remember, other designers may need to see/adapt your style sheets.<br />

Class/ID Coverage<br />

Full Coverage: If you want a property to work throughout a site, you can set it as a Class<br />

or ID. For instance, .red {color:red;} turns all text red that you classify as red – whether<br />

paragraph, header, lists, etc.<br />

Specific Coverage: If you want to affect only a specific selector, such as all text in a specific<br />

table cell, you would list the selector, then the class or id: td.red {color:red;} This<br />

means that every time you create a new table data cell , the texxt inside will be red.<br />

Here is a more complex example, where an ID has been created called catlinks in order<br />

to style a specific type of link on a web page. The catlinks ID can use both selectors and<br />

pseudo classes.<br />

#catLinks h5 {text-align: left; font-weight: bold;}<br />

#catLinks li a:link {color:#666; text-decoration: none; font-weight: bold;}<br />

#catLinks li a:hover {color:#202020; text-decoration: none; font-weight: bold;<br />

}<br />

#catLinks li a:visited {color:#333; text-decoration: none; font-weight: bold;}<br />

#catLinks li a:focus, a:active {color:#666; text-decoration: none; font-weight:<br />

bold;}<br />

Combination Coverage: You can combine multiple classes inside one element:<br />

.gray {color:#666;}<br />

.intense {font-weight:bold;}<br />

Gray bold text here<br />

Pseudo Classes<br />

A pseudo-class is similar to a class in CSS, but it’s not specified explicitly in the markup,<br />

like body, paragraph, and table elements are. Some pseudo-classes are also dynamic, and<br />

are applied as a result of user interaction with the document (like a form).<br />

A pseudo-class starts with a colon (:). No whitespace may appear between a type selector<br />

or universal selector and the colon, nor can whitespace appear after the colon.<br />

208

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!