Help? (Access key: H)
Biomedical Engineering
Design Projects

Adding Another Cascading Style Sheet

Skip navigation (Access key: S)
Contact information.

By: Bern Jordan.


 

In a few cases, you may want to add formatting rules that are not present in the template's style sheet. There are several ways to go about adding styles: you alter the existing style sheet, you could add a style tag in the header of the document, or you can link an additional style sheet. I think the last method makes the most sense because you can override the existing rules with your own styling if you desire, but still keep the same overall formatting.

Create a new style sheet and make sure it has the "css" extension. In this abbreviated example of XHTML code, I am assuming I am using an existing template and the new style sheet is named newstyle.css.

Skip XHTML code.

<html>
<head>
<title>Your title</title>

<meta ... />
Lots of meta tags...
<meta ... />

<link rel="stylesheet" href="orig_styles.css"
  type="text/css" title="Default" />

<link rel="stylesheet" href="newstyle.css"
  type="text/css" title="Default" />

</head>

Lots more HTML...

The new style sheet is added in the head section of the code. The new style sheet must have the same title attribute as the existing style sheet (in this case title="Default").


Valid XHTML 1.0!
Valid CSS!
Bobby WorldWide approved, Level Triple-A!
Labeled with the Internet Content Rating Association.
Owner: Willis Tompkins, Ph.D. - tompkins@engr.wisc.edu
Author: Bern Jordan
Created: 3 March 2002
Content updated: 23 October 2002

Back to navigation bar (Access Key: N)
Back to top.