By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,665 Members | 1,761 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,665 IT Pros & Developers. It's quick & easy.

Quick way of changing background color of images

P: n/a
I designed and wrote a web page for a photographer, and the website,
obviously, contains may samples of his work. I have them all
thumbnailed and when clicked on, opens the image alone. Although he
likes the thumbnails, he's disappointed that the images don't look
"elegant" when opened up singly. This is especially true in IE and
other browsers where the image appears in the upper left-hand corner.
Also a factor is that the website has a black background and when
opened standalone, the photo is obviously against a white background
in these cases.

So my question is, is there an quick way to update the current pages'
image links to open in a page with a black background color? I know I
can send it through a CGI script, but that means replacing upwards of
a thousand links, and even with find and replace, that'll be time
consuming. Since all of the links have a <... class="imagelink" ...>
in them, it would be wonderful if there was a way to simply update the
CSS to take care of this.

My guess is that I'm going to have to buckle down and do it manually.
Are there alternatives?
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Scott Royer III wrote:
So my question is, is there an quick way to update the current pages'
image links to open in a page with a black background color?
If you're using Apache, and all the images are in a single directory, it's a
fairly simple matter to rewrite the URL on the fly. For example:

RewriteRule /gallery/images/(*.jpg) /cgi-bin/showimage.cgi?i=(\1)
My guess is that I'm going to have to buckle down and do it manually.


Even if you need to update thousands of pages, it needn't be very painful,
assuming the links are reasonably consistent. Any halfway capable text
editor can do a batch search and replace across multiple files. Uploading
all of the updated files could be a pain if you're on dialup though.

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.