Solved

Master page background images

Posted on 2006-11-16
10
453 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
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 9

Expert Comment

by:kraffay
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 1

Author Comment

by:samme
Comment Utility
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
Comment Utility
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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 12

Expert Comment

by:UnexplainedWays
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
"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
Comment Utility
Try to read this imformation about MasterPages and Site Directory Structure

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

 
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now