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.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Blog:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
 
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.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Blog:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
 
G

Gregory A. Beamer

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

--
Gregory A. Beamer
MVP: MCP: +I, SE, SD, DBA

Blog:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think Outside the Box! |
********************************************
 

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

Top