Masterpage background-image

  • Thread starter Thread starter Mark B
  • Start date Start date
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?
 
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! |
********************************************
 
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! |
********************************************
 
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! |
********************************************
 
Back
Top