Backdrops in CSS

Back
About this page
This page has the image [  ] tiled down the left-hand side with CSS. CSS also ensures the background is white (note this page uses inline styling, which is not as detailed by the page's content!).
In a browser without CSS support, you should observe the default font/colour/indenting as according to the browser settings (and see no other page deformation).
CSS also allows the placement of backgrounds behind other HTML objects on the page.

In the CSS file...
body {
	background-color: white;
	background-image: url(backdrop.gif);
	background-repeat: repeat-y
}

.indent {	/* use <span class="indent"> ... </span> */
	margin-left: 30px
	// ; font-family: helvetica, sans-serif
	// ; ...and so on
}
In the HTML...
Between <HEAD>...</HEAD>, put: <Link rel=stylesheet type="text/css" href="layout.css"> (where layout.css is the file you saved above)
Around the original content, put <Span class="indent">...</Span>

Useful Links
validator.w3.org -Validate your documents
jigsaw.w3.org/css-validator -Validate your stylesheets (several methods)

Top