Having the same background on many pages.

O

OM

I want to have the same background picture on many pages.
I don't want to have the background picture to load for every page
repeteadly.

How can I overcome this?
Can I use CSS?

Any help would be appreciated.

Thanks.


OM
 
J

Jukka K. Korpela

OM said:
I want to have the same background picture on many pages.
I don't want to have the background picture to load for every page
repeteadly.

Caches will handle that, unless you do something to prevent that.
How can I overcome this?

Just don't play against caches. More info:
http://www.mnot.net/cache_docs/
Can I use CSS?

For this? No, of course not. It doesn't matter whether you set the
background in HTML or in CSS.
 
M

mark | r

it wont, once its loaded in the pc caches it and will look to your hd for
the cached copy before it goes online to get it!

mark
 
J

Janne Raiskila

Can I use CSS?
For this? No, of course not.

I disagree. I think CSS is the best way to define same
background to many pages. This way:

1. Create a .css file, for example style.css with only the following
text:

body { background-image: url("filename.jpg") }

2. Add this piece of code to all of your pages:

<link rel="stylesheet" type="text/css" href="style.css">

Now all of your pages share the same background image.
 
J

Jukka K. Korpela

Janne Raiskila said:
I disagree. I think CSS is the best way to define same
background to many pages.

You seem to have missed what the discussion is about. Thank you for making
this apparent to people who know Finnish by your use of a forged E-mail
address.
1. Create a .css file, for example style.css with only the following
text:

body { background-image: url("filename.jpg") }

You have missed the usual precautions, but this is not surprising. Neither
is your implicit idea of using a photograph as a background.
 
O

OM

Thanks for all the replies.

How can I apply a style sheet to a whole document?
I'm using Dreamweaver and the documentation isn't very good.
 
C

Chris Morris

OM said:
How can I apply a style sheet to a whole document?
I'm using Dreamweaver and the documentation isn't very good.

In code view, add <link rel="stylesheet" href="stylesheet.css"
type="text/css"> inside the <head> element.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top