Connecting Tech Pros Worldwide Help | Site Map

Master page and problems with background-image

 
LinkBack Thread Tools Search this Thread
  #1  
Old September 18th, 2006, 07:35 AM
3Dfelix
Guest
 
Posts: n/a
Default Master page and problems with background-image

I have a problem when using a Master page file in diferent aspx files. Some
of this aspx are in different places. I have see that the problem is with
styles definition on master file, when use "background-image". In some aspx
files this background image are lost.

for example:
background-image:url('../App_Themes/images/image2.gif ');

Any solution for this?



  #2  
Old September 18th, 2006, 07:55 AM
Mohamed Mosalem
Guest
 
Posts: n/a
Default RE: Master page and problems with background-image

Hi,
I faced this problem a while and wrote the solution in this post
http://mosalem.blogspot.com/2006/07/...e-path-in.html

Regards,
Mohamed Mosalem

"3Dfelix" wrote:
Quote:
I have a problem when using a Master page file in diferent aspx files. Some
of this aspx are in different places. I have see that the problem is with
styles definition on master file, when use "background-image". In some aspx
files this background image are lost.
>
for example:
background-image:url('../App_Themes/images/image2.gif ');
>
Any solution for this?
>
>
>
  #3  
Old September 18th, 2006, 08:25 AM
3Dfelix
Guest
 
Posts: n/a
Default Re: Master page and problems with background-image

Hi Mosalem,

Thanks for your help. I have read your post and it's good; but I'm not sure how this solve my problem.

I have several background-image for diferent elements defined on a Style within my master page. For example..


<%@ Master Language="C#" AutoEventWireup="true" CodeFile="portada.master.cs" Inherits="portada" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Página Maestra</title>
<link href="../StyleSheet.css" rel="stylesheet" type="text/css" />


<style type="text/css">
<!--
body
{ background-color: #cc3333;
color: #C06000;
background-image: url('../App_Themes/Theme/rayo_azul.gif');
}


#FanTheme-01 {
width:900px;
height:122px;
background-image: url('../App_Themes/Theme/Images/Theme_01.gif');
}




Thanks a lot for your help,




"Mohamed Mosalem" <MohamedMosalem@discussions.microsoft.comescribi ó en el mensaje news:0C78225D-9235-4C03-A442-B4A424D66D97@microsoft.com...
Quote:
Hi,
I faced this problem a while and wrote the solution in this post
http://mosalem.blogspot.com/2006/07/...e-path-in.html

Regards,
Mohamed Mosalem

"3Dfelix" wrote:
Quote:
>I have a problem when using a Master page file in diferent aspx files. Some
>of this aspx are in different places. I have see that the problem is with
>styles definition on master file, when use "background-image". In some aspx
>files this background image are lost.
>
>for example:
> background-image:url('../App_Themes/images/image2.gif ');
>
>Any solution for this?
>
>
>>
  #4  
Old September 18th, 2006, 09:25 AM
Mohamed Mosalem
Guest
 
Posts: n/a
Default Re: Master page and problems with background-image

Hi,
I think you will have to move the background image from the Css to the code
as i did in my post, this is the only solution i know, i no this is a not so
good solution, may be someone knows another solution can help
Regards,
Mohamed Mosalem

"3Dfelix" wrote:
Quote:
Hi Mosalem,
>
Thanks for your help. I have read your post and it's good; but I'm not sure how this solve my problem.
>
I have several background-image for diferent elements defined on a Style within my master page. For example..
>
>
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="portada.master.cs" Inherits="portada" %>
>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Página Maestra</title>
<link href="../StyleSheet.css" rel="stylesheet" type="text/css" />
>
>
<style type="text/css">
<!--
body
{ background-color: #cc3333;
color: #C06000;
background-image: url('../App_Themes/Theme/rayo_azul.gif');
}
>
>
#FanTheme-01 {
width:900px;
height:122px;
background-image: url('../App_Themes/Theme/Images/Theme_01.gif');
}
>
>
>
>
Thanks a lot for your help,
>
>
>
>
"Mohamed Mosalem" <MohamedMosalem@discussions.microsoft.comescribi ó en el mensaje news:0C78225D-9235-4C03-A442-B4A424D66D97@microsoft.com...
Quote:
Hi,
I faced this problem a while and wrote the solution in this post
http://mosalem.blogspot.com/2006/07/...e-path-in.html

Regards,
Mohamed Mosalem

"3Dfelix" wrote:
Quote:
I have a problem when using a Master page file in diferent aspx files. Some
of this aspx are in different places. I have see that the problem is with
styles definition on master file, when use "background-image". In some aspx
files this background image are lost.
>
for example:
background-image:url('../App_Themes/images/image2.gif ');
>
Any solution for this?
>
>
>
  #5  
Old September 18th, 2006, 11:15 AM
3Dfelix
Guest
 
Posts: n/a
Default Re: Master page and problems with background-image

Hi all,

Finally a have found the solution. There are two possibilities:

a) using ResolveClientUrl passing the relative URL, example:
<body background=<%=ResolveClientUrl("picture.gif")%>

b) using external CSS, not embedded

Regards,

Félix

"3Dfelix" <3dfelix@gmail.comescribió en el mensaje
news:O0WruZv2GHA.4932@TK2MSFTNGP02.phx.gbl...
Quote:
>I have a problem when using a Master page file in diferent aspx files. Some
>of this aspx are in different places. I have see that the problem is with
>styles definition on master file, when use "background-image". In some aspx
>files this background image are lost.
>
for example:
background-image:url('../App_Themes/images/image2.gif ');
>
Any solution for this?
>

  #6  
Old September 18th, 2006, 11:35 AM
3Dfelix
Guest
 
Posts: n/a
Default Re: Master page and problems with background-image

hello again,

that solution is working but another little problem araised:

When working in design mode this background images don't appear, and so it's
more difficult to work and design.

Any solution?

thanks

Regards


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.