473,396 Members | 1,914 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.

Text Over an Image?

Hi,
Is it possible using JavaScript to write text over an image?
I know this would be possible by using a HTML table and using the image
as a background but this is undesired. Also, an image map is undesired.
Ideally, I'd like to be able to create text hyperlinks on top of the
image.

Thank-you for your suggestions,

Paul
Jul 20 '05 #1
5 17168
Paul wrote on 27 okt 2003 in comp.lang.javascript:
Is it possible using JavaScript to write text over an image?
I know this would be possible by using a HTML table and using the
image
as a background but this is undesired. Also, an image map is
undesired.
Ideally, I'd like to be able to create text hyperlinks on top of
the image.


Why is a background-inage undesired? It works perfectly!

Else use css position:absolute and z-index

You do not need javascript for that.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #2
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
Paul wrote on 27 okt 2003 in comp.lang.javascript:
Is it possible using JavaScript to write text over an image?
I know this would be possible by using a HTML table and using the
image
as a background but this is undesired. Also, an image map is
undesired.
Ideally, I'd like to be able to create text hyperlinks on top of
the image.


Why is a background-inage undesired? It works perfectly!

Else use css position:absolute and z-index

You do not need javascript for that.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


I can't use a background image in this situation as it is already been used
for another purpose. I shan't go into detail but desperately need to be able
to write text over an image using, preferably JavaScript.

Was hoping to avoid css as the rest of the page is a <table> and just need
this one small requirement to finish.

Any ideas really appreciated,

Thanks,

Paul
Jul 20 '05 #3
Paul wrote on 27 okt 2003 in comp.lang.javascript:
Why is a background-inage undesired? It works perfectly!

Else use css position:absolute and z-index

You do not need javascript for that.


I can't use a background image in this situation as it is already been
used for another purpose. I shan't go into detail but desperately need
to be able to write text over an image using, preferably JavaScript.

Was hoping to avoid css as the rest of the page is a <table> and just
need this one small requirement to finish.


<table<tr><td>

<img src="bgpicture.jpg"
style="position:absolute;z-index:-1;width:120px;height:80px;">

Text on top, no more than fits the picture

</td></tr></table>


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #4

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
Paul wrote on 27 okt 2003 in comp.lang.javascript:
Why is a background-inage undesired? It works perfectly!

Else use css position:absolute and z-index

You do not need javascript for that.


I can't use a background image in this situation as it is already been
used for another purpose. I shan't go into detail but desperately need
to be able to write text over an image using, preferably JavaScript.

Was hoping to avoid css as the rest of the page is a <table> and just
need this one small requirement to finish.


<table><tr><td>

<img src="bgpicture.jpg"
style="position:absolute;z-index:-1;width:120px;height:80px;">

Text on top, no more than fits the picture

</td></tr></table>


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


Nearly perfect! Please tell me that this is possible...

I need to have a background image in the <td>. For example:

<table><tr><td background="bgpicture2.jpg">
<img src="bgpicture.jpg"
style="position:absolute;z-index:-1;width:120px;height:80px;">
Text on top, no more than fits the picture
</td></tr></table>

With the current code, the bgpicture is 'overlayed' with bgpicture2 and
cannot be seen.

I'm really hoping there is a fix for this!

Thank-you for your help on this,

Paul
Jul 20 '05 #5
"Paul" <pl****@dontemailmedirectly.com> wrote in message
news:bn**********@wisteria.csv.warwick.ac.uk...

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
Paul wrote on 27 okt 2003 in comp.lang.javascript:
> Why is a background-inage undesired? It works perfectly!
>
> Else use css position:absolute and z-index
>
> You do not need javascript for that.

I can't use a background image in this situation as it is already been
used for another purpose. I shan't go into detail but desperately need
to be able to write text over an image using, preferably JavaScript.

Was hoping to avoid css as the rest of the page is a <table> and just
need this one small requirement to finish.


<table><tr><td>

<img src="bgpicture.jpg"
style="position:absolute;z-index:-1;width:120px;height:80px;">

Text on top, no more than fits the picture

</td></tr></table>


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


Nearly perfect! Please tell me that this is possible...

I need to have a background image in the <td>. For example:

<table><tr><td background="bgpicture2.jpg">
<img src="bgpicture.jpg"
style="position:absolute;z-index:-1;width:120px;height:80px;">
Text on top, no more than fits the picture
</td></tr></table>

With the current code, the bgpicture is 'overlayed' with bgpicture2 and
cannot be seen.

I'm really hoping there is a fix for this!

Thank-you for your help on this,

Paul

This is what I did...

I gave bgpicture a z-index of 0 and the text a z-index of 1.

Everything is great now - is that what you would have suggested anyway?

Thank-you very much for your help,

Regards,

Paul
Jul 20 '05 #6

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

Similar topics

3
by: Geoff Soper | last post by:
I'm trying to get some text to lie to the right of an image. If the text is deeper than the image I want the text to continue with its left margin following the line projected down from the right...
4
by: Arif Çimen | last post by:
Hi to everybody, I have chnged a button text in design mode. But After compiling and executing the program the text of the button do not change to new value. Any Ideas? Thaks for helps.
5
by: Socrates | last post by:
I am interested in developing an online utility that will enable users to copy and past any image (or upload any image on the internet) to the online utility, which will then convert the image to...
4
by: CG3000 | last post by:
I create a .PNG image ( in Macromedia Fireworks ) which has an gif in it in the top left corner and a lot of empty canvas space to the right. I use about 10 text boxes on a form to populate...
3
by: =?Utf-8?B?SlIx?= | last post by:
I would like to add text to an image. I have tried to use DrawString and it works on some images but on others it is very very small. I am pretty sure it has something to do with the size of the...
1
by: helraizer1 | last post by:
Hi all, I have a dynamic image that picks out data from a dynamically created .line file. showimage.php(5) <?php include("linesfile.php5"); $linesDataFile = new DataFile("data.line");
1
by: littlealex | last post by:
IE6 not displaying text correctly - IE 7 & Firefox 3 are fine! Need some help with this as fairly new to CSS! In IE6 the text for the following page doesn't display properly - rather than being...
6
by: bradyounie | last post by:
I'm writing a program that displays a user-supplied Bitmap and then writes text fields to it. These "text fields" are things that the user can move around on the image, but to render them...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
2
by: neovantage | last post by:
Hey all, I have created transparent PNG images from text dynamically. But it edges are pixel-ate or we can say edges are distorted. Here is my LINK which shows my generated transparent PNG image....
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: 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
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
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
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.