473,903 Members | 3,824 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 20167
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="porta da.master.cs" Inherits="porta da" %>

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

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Págin a 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.mi crosoft.comescr ibió en el mensaje news:0C******** *************** ***********@mic rosoft.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="porta da.master.cs" Inherits="porta da" %>

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

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Págin a 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.mi crosoft.comescr ibió en el mensaje news:0C******** *************** ***********@mic rosoft.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 ResolveClientUr l passing the relative URL, example:
<body background=<%=R esolveClientUrl ("picture.gif") %>

b) using external CSS, not embedded

Regards,

Flix

"3Dfelix" <3d*****@gmail. comescribi en el mensaje
news:O0******** ******@TK2MSFTN GP02.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
1800
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
2452
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 web part page? Does it take place at the page level? ...or the content area level? 3. Where is the Web Part Manager instantiated? ...in the Master Page? ....Content Page? ...elsewhere?
14
2411
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 standard ASPX page with minor modifications to it. All of my pages inherit from a "BasePage.cs" class, that handles common things like getting the user's information out of the session, determines if a page should or should not be password...
4
1879
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, I am having problems with Freedom2.master. The first problem is I sometimes get the following error when I build the site. The type 'Freedom2' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
4
3854
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 more pronounced with 2005 master pages. Is this just in my head or is this a common occurance and is there any adjustments or caching that can be done to minimise this?
3
2091
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 seems to break. For example, Number 13 is coded as follows: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Layout 13</title> <meta http-equiv="content-type" content="text/html;...
4
3145
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 know I can create a new master page, but I'd like to just change the master page from the content page if possible. thanks!
6
3870
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 page in the Menu control. I.e. I have a root item called home. When a person is on the home page I want it to be disabled. Any way to do this?
1
1448
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 folders , I am getting some problem. Initially, images are not displayed. If I am using runat="server", they are dispalyed. But , I am not getting some text and background color at the place of those text messages. Please check in the below code....
6
1695
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 templates in that when the master page is updated, all the child pages created from the master page are updated and then they all need to be uploaded to the server? Or do you only have to upload the master page after an update?
0
9999
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
11282
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10873
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10500
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9684
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 projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8048
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5894
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3324
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.