University of Melbourne home page
 

CSS in the templates

Most of the CSS in the template package is served up from a central file. The central styles have been carefully tested to work across browsers and to ensure that they do not cause any usability or accessibility problems.

Styles for web content

In the central style sheet are a number of styles intended for use by web page authors. These can usually be applied by the simple addition of a class attribute to a particular html element. For more information, see the style guide.

Adding new styles

Each site has it’s own custom.css file which should provide all the functionality a site manager would require to customise or enhance their site.

The custom.css file allows site managers to create styles unique to their site. Adding styles is easy, but certain guidelines should be followed to ensure new styles do not break existing styles or cause problems for other sections of the page.

Be specific

The best way of ensuring your styles do not have unintended effects is to name them carefully. If, for example, you wanted to create a specially styled list and you created a style based on the ul selector, it would affect all unordered lists on the page - including the menu, quicklinks etc. - it would be a mess!

To ensure your style only affected the lists you wanted it to, you would use a selector like: #content ul.special {}, ensuring your new style only affected unordered lists of class special in the content area of the page.

If you use this logic when creating new styles, it is unlikely to have unexpected style conflicts.

 
templates/css.txt · Last modified: 2007/06/06 16:42 by aharris
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki