My favorites | Sign in
Project Logo
                
Search
for
Updated Mar 20, 2008 by daz4126
CodingConventions  
Coding Conventions used by the Sparkl framework.

Coding Conventions

Sparkl uses a number of coding conventions that try to make the markup as meaningful as possible. It also ties in with the CSS to make styling easier.

Page layout and Structure

Each page contains the following structure:

page

A containing div.

header

A div for the logo, primary navigation tabs, and other site-specific information

content

A div that contains all of the content, usually split into sub-containers with the names:

Although not all or any of these are required.

footer

Placed at the end of the markup - usually containing site-information such as copyright notices and validation links.

Headings

Heading tags should be used in the following way to give hierarchy to the site:

h1 site title h2 for page title h3 top heading in content h4 sub headings in content h5 & h6 - Lower level headings in content, usually only used for large, strucured sets of data.

Navigation

For a list of links used for navigation, be sure to use an unordered list tag and place tags inside list elements (

  • tag). Give the unordered list tag a class of 'navigation'.

    Images

    Images are simply named after the element that they are the background of. For example the background image of the primaryContent div would simply be named primaryContent.png

    This means that the CSS file does not need to be changed - simply change the image. It also means that themes can have a consistent naming policy and be easily interchangeable. It also means that the images and CSS can be developed independently.


  • Sign in to add a comment
    Hosted by Google Code