473,414 Members | 1,703 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,414 software developers and data experts.

Applying themes to html

I have a master page that has a table. The table represents a banner.
I need to change background images for the cells depending on the page
theme.
I set up css and defined styles with background -image: url(...). I set up
images in theme folder and it didn't work. Then I decided to move images to
root and it didn't work either (the page in not in root. May be for root
pages it would help but I can't put all pages in root anyway).

Is there any solution for this?
Thanks.
Shimon.
Mar 21 '06 #1
1 1290
Hi Shimon,

Welcome to the MSDN newsgroup.

From your description, I understand that you're using the theme in one of
your ASP.NET 2.0 web application. Also, the theme include a css style sheet
and one of the classes in it use a background image, however, you're
suffering problems on how to make the actual page resolve the relative url
in css style sheet correctly(no matter what folder hierarchy are they
located), correct?

Based on my research, this is a difficult problem because the ASP.NET
Theme/skin setting mostly apply on server control's control tag and the
attributes, and the theme folder specific path also only appliable to
server control's image attributes. For normal css style sheet, the image
path in it still be parsed by the client-side browser (according to the
actual page's url address). So far we can consider the following
approaches to workaround this problem when using style sheet (css) that
using relative url path:

1. We can consider use IIS site specific absolute path, which start with
"/", this means the path is an absolute path and start from the IIS
website's root. The drawback is that if the application is not deployed in
IIS site root(or the image resources are not deployed at IIS Site root), we
have to specify the application's virtual dir name in the image path also.

2. Instead of using the raw html element, we can consider using ASP.NET
Table server control, thus, we can use the skin file to define the table's
template.

Hope this helps.

Regards,

Steven Cheng
Microsoft Online Community Support
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 22 '06 #2

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

Similar topics

2
by: Martin | last post by:
I think it would be good to have an article comparing these 2 technologies, and explaining why themes are necessary. I guess it's because css is tied to mark up, where as themes are aligned with...
7
by: sasquatch | last post by:
Hi, I've a a site with nested master pages and content pages. I tried using a theme with a stylesheet in the app_themes directory referencing it in the web.config file from a pages tag theme...
1
by: kfc1976 | last post by:
Hi All, First of all, following are the facts 1) I've been trying to solve the following issue for the past 8 hours (Not Kidding) 2) If I can't find the answer, It will drive me completely crazy...
0
by: Full Decent | last post by:
Hey again! In my quest to make proper use of OO PHP I would like to ask for a critique of the current method of doing themes in the Camera Life (http://fdcl.sf.net) software and see if an OO...
1
by: Ashok | last post by:
Hi I have some issues in applying Themes to controls programatically, when controls are inside WebpartZone. I have put some Webparts inside WebpartZone, i want to apply themes and skin to those...
4
by: Sean | last post by:
My experience now working with master pages on and off for 6 months is that they can be very dangerous when working with themes. One example in particular is the changes I made to my banner menu...
6
by: Clinton Farleigh | last post by:
Hi, I was going to ask a question, but I think I've answered it so now I am going to rant about how crappy ASP.NET themes are instead. As I've indicated above, my problem today is with themes....
9
by: Guillaume Dargaud | last post by:
Hello all, I have a strange problem with a new install of Gallery2: Firefox does not display the style of the pages while IE does (but nobody I know uses IE). I'm not familiar with the way...
6
pradeepjain
by: pradeepjain | last post by:
Hii guys, i am generating a php mail like this $message = ' <html> <head> <style type="text/css" media="all">@import "/themes/admitcard.css";</style> <title>Birthday Reminders...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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,...
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.