Solved

Master page background images

Posted on 2006-11-16
10
458 Views
Last Modified: 2008-10-20
I have a  
about.aspx,
MasterPage.master,
images<------------ folder containing the images
pages<-------------folder containing web pages
all located under my root directory.

The about.aspx shows perfect with masterpage.master; however, if I pull up any other page under the pages folder the background images for the masterpage are not displayed.

I believe the problem is how the image location is specified, but then again, it may be something I haven't thought of yet.

Here is the code located on my masterpage.master
<td  style="background-image: url(images/blue-gradient.gif);">
 

How do I fix this?


Thanks
0
Comment
Question by:samme
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 9

Expert Comment

by:kraffay
ID: 17960388
You need to use a relative path:

url(/images/blue-gradient.gif)

if that doesn't work, try this:
url(../images/blue-gradient.gif)

0
 
LVL 1

Author Comment

by:samme
ID: 17960434
Nope didn't work. Thank you for the suggestion.

I've tried your suggestions plus

url(~/images/blue-gradient.gif)
url(~\images/blue-gradient.gif)
and
url(\images/blue-gradient.gif)
0
 
LVL 9

Accepted Solution

by:
kraffay earned 125 total points
ID: 17960579
I got this [../images/] to work on my page, but i have this structrure:

-- >Root
         ------>Masterpage.master
--> Pages
         ------>Child page
--> Images
         ------>background.gif

Can you put your master page in the same folder as your pages?

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:samme
ID: 17960817
There are quite a few folders under the root, one for each security setting.  So, I would need to recreate the masterpage under about 15 different folders.

I have tried placing the master page in its own folder....this didn't work.  
0
 
LVL 9

Expert Comment

by:kraffay
ID: 17960869
Can you put a class in your stylesheet with this attribute:

background-image: url(images/blue-gradient.gif);

and reference that stylesheet in your master page?
0
 
LVL 12

Expert Comment

by:UnexplainedWays
ID: 17961397
Can you try the full path?

<td  style="background-image: url(http://There are quite a few folders under the root/images/blue-gradient.gif);">
0
 
LVL 12

Expert Comment

by:sandip132
ID: 17962858
To get the actual path... Simply add one Image control on your form... then add the image path  from the "imageurl" property. You will get the path, just copy paste in :
<td  style="background-image: url(images/blue-gradient.gif);">
0
 
LVL 1

Author Comment

by:samme
ID: 17965377
kraffay... the class showed the image in the master page, but not the other pages

unexplainedways...  the full path doesn't show the image at all

sandip132...  the imageurl would be <td  style="background-image: url(~/images/blue-gradient.gif);">; this doesn't show the image at all

Thanks
0
 
LVL 12

Expert Comment

by:UnexplainedWays
ID: 17970042
"the full path doesn't show the image at all"

then you have bigger problems, have you managed to get it working at all?
0
 

Expert Comment

by:buchholt
ID: 22762649
Try to read this imformation about MasterPages and Site Directory Structure

http://msdn.microsoft.com/en-us/magazine/cc163967.aspx

 
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question