PAGE BACKGROUND
Using CSS to control a web page's background
|
Options, style sheets and Dreamweaver There seems to be a lot of confusion over how a page's background can be (or should be) controlled. There are some options for placing attributes in the opening <BODY> tag which seem to be quick, easy and effective but which, sadly, work properly only in Internet Explorer. Using Cascading Style Sheet (CSS) technology seems to be the answer - In Dreamweaver it's easy after you've done it once but that first time can be a trial! As an example, here are two pages, one uses the quick and dirty option which works for IE (PageBG_IE.htm) and the other (PageBG_CSS) which works with most browsers. The notes below cover how to achieve the results using Dreamweaver. (DWMX is the version used.) This
is the background image used |
||||||||||||||||||||||||
|
How's it done? Putting a background into a page is achieved by inserting an image's path into the <BODY> tag, like this:
Producing a result like this example. Note that the image is tiled across and down the page and scrolls with the page - As though the image and the words are printed on a sheet of paper and the sheet is moved. Let's look at the easy way to control scrolling next . . . <BODY> tag attributes Create an HTML page in the editor of your choice and call it PageBG_IE.htm - this should contain the bare-bones HTML code At the default <BODY> tag, update the tag's attributes from
to
Add some rows of text to the page, save the document and view it (In IE, of course!) CSS attributes
|
||||||||||||||||||||||||
|
Most of this is covered quite well in the Macromedia help files and in some detail in how-to books like Dreamweaver MX Bible, by Joseph W Lowery, ISBN 0-7645-4931-6; published by Wiley Publishing Inc (http://www.wiley.com) Once you've started using CSS a whole new world of control is delivered to your fingertips! |
||||||||||||||||||||||||
xxx,xxx