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

changing path to images using css

I'm just learning CSS, so I'm not aware of it's capabilities. As an
example my problem is that I have many different images with identical
names, within three seperate folders. so, in my root folder I have
three folders with the files in each like this:

/root/blue_theme/welcome.gif
/root/green_theme/welcome.gif
/root/red_theme/welcome.gif

what I want to be able to do, is insert the name of the files (<img
src="welcome.gif" >, <img src="bullet.gif") into my pages, and then be
able to change the path to all the images with one change in my css
file, without having to go back and chang all entries or making
duplicate instances of all my html files.

Is this possible with CSS? I looked for an answer, but I've been unable
to find an answer.

Thanks for the help,

Barend.

Jul 21 '05 #1
1 3953
Hi,
[...]
/root/blue_theme/welcome.gif
/root/green_theme/welcome.gif
/root/red_theme/welcome.gif

what I want to be able to do, is insert the name of the files (<img
src="welcome.gif" >, <img src="bullet.gif") into my pages, and then be
able to change the path to all the images with one change in my css
file, without having to go back and chang all entries or making
duplicate instances of all my html files.

Is this possible with CSS? I looked for an answer, but I've been unable
to find an answer.


it's not possible like you described it. But if you use 3 different
css-files (I guess so), you can do it like this:
[HTML]
<div class="welcome"></div>

[CSS]
..welcome {
width: your-image-width;
height: your-image-height;
background-image:url(/root/your-theme/welcome.gif);
}
Chris
Jul 21 '05 #2

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

Similar topics

2
by: Scott Tilton | last post by:
We have a field that gets filled into a database that our ASP website pulls from. What we would like to be able to do is to take that path and convert it to a virtual path so the website can...
7
by: Wayne | last post by:
I have a script that uses filesystemobject that reads files from a given path, in my case images. It is running on a server that is 2000 adv svr w/ all current patches. The script prior to some...
2
by: Paolo Pignatelli | last post by:
I am trying to get an output/file like this (below) in an XML file (MyXmlFile.xml) (which I will use for a slide show) -- <gallery timer="3" order="sequential" fadetime="2" looping="yes"...
6
by: John Ortt | last post by:
Hi there everyone, I have a part info form which has a faded image of our company logo as a background. I want to replace the faded image with a bright red warning image on items which have run...
2
by: Tom Wells | last post by:
I have a little file upload page that I have been able to use to successfully upload files to the C: drive of LocalHost (my machine). I need to be able to upload to a network drive from the intranet...
19
by: Steve Franks | last post by:
I am using VS.NET 2005 beta 2. When I run my project locally using the default ASP.NET Development Web Server it runs using a root address like this: http://localhost:11243/testsite/ However...
3
by: David Thielen | last post by:
Hi; I created a virtual directory in IIS 6.0 and my asp.net app runs fine. But when it tries to write a file I get: Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images ...
1
by: mtp | last post by:
Hello, in several docbook XML files, i have: <mediaobject> <imageobject> <imagedata fileref="../images/pic1.png"/> </imageobject> </mediaobject>
4
by: Tim Streater | last post by:
I have a small image on my web page that, when clicked, does some javascript stuff which changes the page. To highlight that this has happened, I want to replace the image with another. Each is a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
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:
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
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.