473,396 Members | 2,011 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,396 software developers and data experts.

Resizing a Table Background Image

I have a table like this

[table width=125]
[tr]
[td background="map.gif"]
[img src="foreground.gif" width=125]
[/td]
[/tr]
[/table]

What the code does is display a background map of width=125 with
roads, hills and rivers etc. The foreground image is a transparent GIF
showing town names which fits exactly over the background map.

Some of my users find the result difficult to read so I want to
implement a zoom in. The background image has to double in size to 250
pixels. As will the foreground image but that's easy.

How do I get the background image to double in size?

One image is just to use simple HTML and create second versions of all
the background images doubled in width. Trouble is I have thousands of
the pesky things - it would send me over my disk space allocation from
my ISP. And I want an elegant solution!

thanks

Scott
Jul 20 '05 #1
3 18276
You can always change the background image to a large version like
this..............

<script>
function increaseImg(){
document.all.backImg.background = "maplarge.gif"
document.all.foreImg.width = "250"
}
</script>

<table width=125>
<tr>
<td background="map.gif" id="backImg"><img id="foreImg" src="foreground.gif"
width="125"></td>
</tr>
</table>

<a href="#" onclick="increaseImg();">increase image sizes</a>
Jul 20 '05 #2
I forgot to say this would only work in Internet Explorer!


"luke" <gr******@hotmail.com> wrote in message
news:bt************@ID-218367.news.uni-berlin.de...
You can always change the background image to a large version like
this..............

<script>
function increaseImg(){
document.all.backImg.background = "maplarge.gif"
document.all.foreImg.width = "250"
}
</script>

<table width=125>
<tr>
<td background="map.gif" id="backImg"><img id="foreImg" src="foreground.gif" width="125"></td>
</tr>
</table>

<a href="#" onclick="increaseImg();">increase image sizes</a>

Jul 20 '05 #3
Luke,

Thanks.

However, this solution needs a second, enlarged, background image.

best regards

Scott
Jul 20 '05 #4

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

Similar topics

13
by: Jon Yeager | last post by:
I need to display a bunch of pictures that are all of various dimensions into a fixed dimension space, like MSN Messenger does with its user photos in the chat windows. Forcing image dimensions...
1
by: Ron Vecchi | last post by:
I am using asp.net to upload an image and then perform resizing on it and saving the different sizes to file. The resized images were coming up and being displayed in the bowser fine but the image...
0
by: Oleg Ogurok | last post by:
Hi all, I'm having this problem. I have a 50x50 GIF image with a transparent background. I'm trying to resize it to 25x25 using GDI+ capabilities. With Windows Forms' Image control, the image...
2
by: Nathan | last post by:
How doy you resize the background image to fill a form when the form is resized?
14
by: Seige | last post by:
Ever had headache when you can't resize the background width using CSS: body{ background: url(/images/bg.jpg) ; background-width: 800px; } It won't work, would it? Of course not, it's not even...
6
by: tomasio | last post by:
Dear NG, years have passed and I am still more designer than programmer. I build a new version of my website which has a few nasty bugs, especially on my startpage: Resizing text brakes the...
5
by: drum118 | last post by:
Trying to resize a photo to use it as a background and it fails under part of the css <img src="subway/IMG_0730.JPG" width="3264" height="2448" alt="" /> I have try and the photo does not...
9
by: dli07 | last post by:
Hello, I'm trying to convert a piece of code that creates a dynamic vertical resizing bar in a table from internet explorer to firefox. It's based on a post from...
0
by: whairs01 | last post by:
Could someone help me and telling me how to get my 3 column web page to resize correctly in IE7. When trying to reside my my web page I can only get it to resize to a point before the 2 and 3...
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
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?
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
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
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.