Child pages
  • HTML and CSS Background

Documentation for a historical release of Infusion: 1.3
Please view the Infusion Documentation site for the latest documentation.
If you're looking for Fluid Project coordination, design, communication, etc, try the Fluid Project Wiki.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 20 Next »

Unknown macro: {style}


Unknown macro: {float}
Unknown macro: {div}
On This Page


Through summaries of key concepts and CSS examples, this article aims to describe how you can override FSS styles and classes with your own CSS styles.

More technical details and background information regarding the CSS concepts  are provided at the W3C.

Key Concepts

The following are HTML and CSS concepts that you may find helpful to have knowledge of before proceeding to learn how to override FSS styles.


The structure of HTML is hierarchical and can be compared to a tree structure, where one element, or HTML tag (eg. <body>, <p>) has the following characteristics:

  1. It can contain several "child" elements
  2. It belongs to only one "parent" element
  3. It can have several "ancestor" elements (parents of its parent element)
  4. It can have several "descendent" elements (children of its child elements)

CSS can support such a structure by allowing child elements to inherit certain properties of their parents when specified.

Example: You can try this out yourself.

body { font-family: "Times New Roman"; font-size: 0.9em; }
p { font-family: inherit; font-size: 1.2em; }
div { font-family: "Arial"; font-size: inherit; }

This style sheet specifies the font and text size for body, p, and div tags. The inherit value indicates that the child element inherits the same property style as its parent element. In this case, any p tag will inherit the font of its parent element, while any div tag will inherit the text size of its parent element.

    <link rel="stylesheet" href="style.css" type="text/css">
    <title>Inheritance Example</title>
    <p>P1 - This is a child paragraph inside the body tag.</p>
    <p>P2 - This is another child paragraph inside body.</p>
    <div>DIV1 - This is another child element inside body.
      <p>P3 - This is a child paragraph inside the div (DIV1) tag.</p>

This HTML document uses the sample style sheet above. It has two p tags (P1 & P2) and a div tag (DIV1) with its own p tag (P3). According to style.css, P1 and P2 inherits its font from body, which is Times New Roman, while the size of its text is 1.2em. DIV1, however, uses the Arial font, but inherits its text size of 0.9em from body.

Style sheet origins

One thing to keep in mind when creating style sheets for your website is that visitors (users) can load their own style sheets to change the display of your design (not permanently though--this is just for their viewing). The reason may be that these users have certain needs, and so would use a personal style sheet specifying their preferences. For instance, users who are colourblind may want to specify their own colour scheme for differentiating headings and links.

In other words, a site's design can have more than one style sheet applied to it. There are three types:

Author: asdf

User: asdf

User Agent: asdf

!importance declaration

Summarize concept and include examples


Summarize concept and include examples

Order of overrides

Summarize concept and include examples

How to Override FSS Styles


Overriding an Entire Class


Overriding an Instance of a Class


  • No labels