Masterpage background-image

M

Mark B

In the top section of my MasterPage, I have a background image in a table:

<table style= "background-image:
url('../../pages/master_page/images/header_background.png'); height: 176px;
" width="949">

I all works fine except on pages that are deeper than the Master Page folder
level it doesn't display.

If I hard-code:

url('http://www.mysite/pages/master_page/images/header_background.png');

It works on all pages but I don't want to do this because then I can run it
locally on my PC.

Any suggestions?
 
G

Gregory Beamer

Try setting up the style in a stylesheet and referencing the style there. It
should make things easier all around, as images are relative to the css
file, not the master page.
 
M

Mark B

Thanks. That worked.

Gregory Beamer said:
Try setting up the style in a stylesheet and referencing the style there.
It should make things easier all around, as images are relative to the css
file, not the master page.
 
G

Gregory A. Beamer

You are welcome. It gets confusing some times, even after you have done this
for a long time. :)
 

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,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top