code


Import Other Stylesheets from within a Stylesheet

This article from Smashing Magazine shows how to use CSS Imports to include other css files in you stylesheet.

 /*——————————————————————[Master Stylesheet] Project: Smashing MagazineVersion: 1.1Last change: 05/02/08 [fixed Float bug, vf]Assigned to: Vitaly Friedman (vf), Sven Lennartz (sl)Primary use: Magazine——————————————————————-*/@import "reset.css";@import "layout.css";@import "colors.css";@import "typography.css";@import "flash.css";/* @import "debugging.css"; */ 

Random Image on Page Javascript

Random Image on Page Javascript

This little bit of code will allow you to revolve several images on a web page each time the page reloads. Just update your image location between the “” for each myimages variable and the corresponding link between the “” for each imagelinks variable. Add more if you like or take some away.
 <script language="JavaScript"><!–  function random_imglink(){  //specify [...]

Eric Meyer’s CSS Reset

Eric Meyer's CSS Reset

This little bit of code from Eric Meyer is very helpful when building a website that is compatible with many different browsers. Ehem… less than IE 7. I did say helpful (not a cure). Create a new .css file (ex. reset.css) and use a meta link to call it before your main css file.
 
<link rel="stylesheet" [...]

CodeHighlighter

CodeHighlighter

This plugin is a syntax highlighter for source code in Wordpress.

Usage

Put the code snippet to pre tag.
Add the lang attribute to the pre tag like the following.

<pre lang=”cpp”>

Add the lineno attribute to the pre tag after the lang tag like the following if you want to display line numbers. [...]