HighDots Forums  

specifying different background-image to the default in 'body'

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss specifying different background-image to the default in 'body' in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dave
 
Posts: n/a

Default specifying different background-image to the default in 'body' - 12-01-2004 , 09:45 AM






Hi,
if I have a body colour (white) specified in an external css sheet,
what should I do in an individual webpage that is to have a
background-image, i.e. override the attribute 'white' set in the style
sheet? Without having other attributes stated in body being forgotten
by browsers.
Do I have to link that page to a separate but nearly identical css
sheet just for itself with only that 'background' difference?

Thanks in advance,
Dave

Reply With Quote
  #2  
Old   
Beauregard T. Shagnasty
 
Posts: n/a

Default Re: specifying different background-image to the default in 'body' - 12-01-2004 , 10:29 AM






Dave wrote:

Quote:
if I have a body colour (white) specified in an external css sheet,
what should I do in an individual webpage that is to have a
background-image, i.e. override the attribute 'white' set in the
style sheet? Without having other attributes stated in body being
forgotten by browsers. Do I have to link that page to a separate
but nearly identical css sheet just for itself with only that
'background' difference?
No separate sheet needed. Just add this in the <head> section, after
the link to the stylesheet.

<style type="text/css">
body { background-image: url("path/to/image.gif") }
</style>

...or whatever else you want to override from the external file.

--
-bts
-This space intentionally left blank.


Reply With Quote
  #3  
Old   
Mark Tranchant
 
Posts: n/a

Default Re: specifying different background-image to the default in 'body' - 12-01-2004 , 10:35 AM



Dave wrote:

Quote:
if I have a body colour (white) specified in an external css sheet,
what should I do in an individual webpage that is to have a
background-image, i.e. override the attribute 'white' set in the style
sheet? Without having other attributes stated in body being forgotten
by browsers.
Do I have to link that page to a separate but nearly identical css
sheet just for itself with only that 'background' difference?
Either put a class on the body element and include the separate styling
in the main CSS file, or include inline styling after the link to the
external sheet.

If you only specify the background-color, all of the other properties
will cascade through.

--
Mark.
http://tranchant.plus.com/


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.