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.

CSS Basics<br />

392<br />

<br />

The browser will now read the style definitions and display the contents of<br />

the web pages, based on the formatting options listed in the style sheet.<br />

3. Inline Styles<br />

This method should be used when a style is to be applied to a single occurrence of<br />

an element in the web page. To use inline styles, you use the style attribute within<br />

the tag. The style attribute can contain any CSS property. The example below<br />

shows the syntax to change the color and the left margin of a paragraph:<br />

This paragraph is formatted using<br />

inline styles<br />

Understanding Inheritance in Cascading Style Sheets<br />

In CSS there is an order of precedence that is followed when a CSS style sheet is<br />

applied. Take for example when both an external style sheet is referenced on a Web<br />

page that also includes style definitions internally on the Web page.<br />

As we learned from the Basics of CSS section, the external style sheet will be<br />

applied to any style definitions it finds until it meets an internal style definition of<br />

the same selector. From the example below, you can see that the h2 selector will<br />

apply the style definition from the external style sheet and then apply the internal<br />

style sheet definition when a matching property is found.<br />

External style sheet<br />

h2<br />

{<br />

color: blue;<br />

text-align: left;<br />

font-size: 10pt}<br />

Internal style sheet:<br />

h2<br />

{<br />

text-align: right;

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

Saved successfully!

Ooh no, something went wrong!