Re: background help

by "Eric A. Meyer" <eam3(at)po.cwru.edu>

 Date:  Mon, 27 Sep 1999 09:47:38 -0400
 To:  hwg-style(at)hwg.org
 In-Reply-To:  nb
  todo: View Thread, Original
At 8:52 -0400 09/27/1999, Tina Stanton wrote:

>I'm having some trouble getting a background to show up using stylesheets
>and I'm about to lose my mind. ;o)
>
><STYLE TYPE="text/css">
><!--
>	BODY { background: blueback.jpg;
>		 color: #0000A0;
>	       font-family: Arial, Geneva, Sans-Serif;
>	       font-size: 10pt }

The above part should be:

	BODY {background: url(blueback.jpg);
		 color: #0000A0;
	       font-family: Arial, Geneva, Sans-Serif;
	       font-size: 10pt }

It is necessary to wrap URLs in the 'url()' container; otherwise, they
don't (or at least shouldn't) work, as you discovered.
   Also-- just as a tip-- you may want to follow your final rule with a
semi-colon.  It isn't required, by any means, but some older browsers (IE3,
early Netscape 4) get very confused if the final rule isn't followed by a
semi-colon.
   For future reference, you should probably check your CSS at one of the
following spots:

     http://jigsaw.w3.org/css-validator/
     http://www.htmlhelp.com/tools/csscheck/

   These can help by pointing out both syntactical errors, like that above,
and by warning of possible rule conflicts in your stylesheets.  They won't
catch everything, of course, but are still a great help to authors
everywhere.  Try them both, decide which you like better, and bookmark it.

--
Eric A. Meyer  -  eam3(at)po.cwru.edu  -  http://www.cwru.edu/home/eam3.html
 Hypermedia Systems Manager
 Digital Media Services                http://www.cwru.edu/dms/dms.html
 Case Western Reserve University       http://www.cwru.edu/

HWG hwg-style mailing list archives, maintained by Webmasters @ IWA