05.03.2013 Views

User Guide - NetObjects Fusion

User Guide - NetObjects Fusion

User Guide - NetObjects Fusion

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Chapter 20 Working with CSS and SiteStyles<br />

4. Inline style, which is located inside a HTML element. This inline style has the<br />

highest priority, meaning that it will override a style declared inside the tag,<br />

in an external style sheet, or in a browser’s a default value.<br />

Explaining CSS Syntax<br />

CSS stylesheets contain rules that describe how document elements should be<br />

displayed. A rule in CSS consists of two parts:<br />

• Selector, which can be applied in three different ways:<br />

• HTML elements, such as tags, tags, etc.<br />

• elements with a specific CLASS, such as an element with the class<br />

“content” ()<br />

• elements with a specific ID, such as an element with the ID “warning1“ ()<br />

• Declaration, which contains sequences of properties followed by values.<br />

selector {property: value}<br />

body {color: black}<br />

In this example, body is the selector, while everything within the brackets<br />

{color:black} is the declaration.<br />

If the value is expressed in multiple words, it is necessary to place quotes around<br />

the value:<br />

p {font-family: "sans serif"}<br />

If you wish to specify more than one property, you must separate each property<br />

with a semicolon.<br />

p {text-align:left;color:red}<br />

To make the style definitions more clear, you can describe each property on a<br />

separate line, like this:<br />

p<br />

{<br />

text-align: left;<br />

font-family: tahoma;<br />

389

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

Saved successfully!

Ooh no, something went wrong!