473,406 Members | 2,273 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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?
Sep 18 '06 #1
5 20138
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:
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?
Sep 18 '06 #2
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" <Mo************@discussions.microsoft.comescribi ó en el mensaje news:0C**********************************@microsof t.com...
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:
>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?
Sep 18 '06 #3
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:
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" <Mo************@discussions.microsoft.comescribi ó en el mensaje news:0C**********************************@microsof t.com...
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:
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?
Sep 18 '06 #4
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" <3d*****@gmail.comescribió en el mensaje
news:O0**************@TK2MSFTNGP02.phx.gbl...
>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?

Sep 18 '06 #5
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
Sep 18 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Beren | last post by:
Hi all I'm almost braindead on this one, but how can I create a master/detail datagrid in this format : CatA subcatA1 subcatA2 subcatA3
5
by: Michael Herman \(Parallelspace\) | last post by:
1. What are some compelling solutions for using Master/Content pages with Web Pages? 2. If a content area has a web part zone with web parts, what is the user experience like when "editting" the...
14
by: multiformity | last post by:
So I have been working on an opensource project for a while, and decided to really try to make it look better after focusing on the functionality most of this time. Up to now, I have simply used a...
4
by: EagleRed | last post by:
I am writing an ASP.NET 2.0 application that uses more than one master page. Currently, there are two pages, Freedom1.master and Freedom2.master. I have no problems with Freedom1.master. However,...
4
by: Bishop | last post by:
Using master pages, everytime the page reloads there is a delay where I see the background, then the new page starts to display. Although I remember seeing some of this with asp.net 2003 it seems...
3
by: Paul | last post by:
I found a great site for CSS tempaltes, http://blog.html.it/layoutgala/ . I downloaded them, and played around with them. Then I tried to use the template in as ASP.Net MasterPage, but everything...
4
by: David Lozzi | last post by:
Howdy, I have my master page, and I would like to change the background CSS class per the content page. Only the home page has a different background style, all other pages are using the same. I...
6
by: Sunfire | last post by:
Is there a way you can test what page is loaded from inside a master page? What I need to do is test to see what page is loaded inside the master page and then gray out the root item linked to that...
1
by: kchaitanya | last post by:
I have created a master page. When I am adding this master page to .aspx files which are in the root directory, it is working fine. When , I am adding master page to .aspx files which are in sub...
6
by: Mickey | last post by:
Coming from a Dreamweaver/ASP/PHP background. Planning to use Visual Studio 2008 for a website. Complete newbie question here (please be gentle!): Do master pages work similar to Dreamweaver...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.