Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Master page background images

Posted on 2006-11-16
10
Medium Priority
?
464 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 375 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

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 …
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

705 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