Refering to a master page from a directory

J

JJ

My master page contains various graphics that are referenced from the images
folder. As long as the container pages are at the same level (ie. the top
level looking at the solution explorer in Visual studio 2005) as the master
page, the images appear correctly.

However, the images do not appear when I am using a container file within a
directory.

Do I need to use links that aren't relative to the master page so that any
content page in any directory can use the same master.

Can anyone help me....?

JJ
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

Use a css file to specify the graphics. Then the url of the images are
expressed relative to the css file, not relative to the page.

If you create a theme and put the css file in the theme folder, you can
just set the Theme property of the page and it will add a link with a
correct address to the css file regardless of where the page is.
 
J

JJ

Thanks. I declared a new class in my css file called '.main_graphic'. When
I built the class through the Visual Studio wizard however, the link to the
image was wrong:
Visual Studio put this:
img/main_graphic.jpg

When in fact it only works if it is this:
.../../img/main_graphic.jpg

as the css file is in the 'Theme1' folder which is in the 'App_Themes'
folder. Either thats a bug or I am doing something wrong??? Am I supposed to
store all images in the Theme folder?



I also assume that you have to set the 'background image 'of the class in
order to have a graphic, so that class looks like this:
..main_graphic

{

background-image: url(../../img/main_graphic.jpg);

background-repeat: no-repeat;

}

Is this the corect approach??

Thanks

JJ
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

I have never used that wizard in Visual studio 2003/2005, so I can't say
anything about it.

You can put your images in the theme folder if you like, but there is no
need to.

Yes, that css looks correct.
 
J

JJ

Thanks.

Göran Andersson said:
I have never used that wizard in Visual studio 2003/2005, so I can't say
anything about it.

You can put your images in the theme folder if you like, but there is no
need to.

Yes, that css looks correct.
 

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

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top