Connecting Tech Pros Worldwide Help | Site Map

Text Over an Image?

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 20th, 2005, 11:23 AM
Paul
Guest
 
Posts: n/a
Default 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



  #2  
Old July 20th, 2005, 11:23 AM
Evertjan.
Guest
 
Posts: n/a
Default Re: Text Over an Image?

Paul wrote on 27 okt 2003 in comp.lang.javascript:[color=blue]
> 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.[/color]

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)
  #3  
Old July 20th, 2005, 11:23 AM
Paul
Guest
 
Posts: n/a
Default Re: Text Over an Image?

"Evertjan." <exjxw.hannivoort@interxnl.net> wrote in message
news:Xns942169920CF9Ceejj99@194.109.133.29...[color=blue]
> Paul wrote on 27 okt 2003 in comp.lang.javascript:[color=green]
> > 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.[/color]
>
> 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)[/color]

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


  #4  
Old July 20th, 2005, 11:23 AM
Evertjan.
Guest
 
Posts: n/a
Default Re: Text Over an Image?

Paul wrote on 27 okt 2003 in comp.lang.javascript:
[color=blue][color=green]
>> Why is a background-inage undesired? It works perfectly!
>>
>> Else use css position:absolute and z-index
>>
>> You do not need javascript for that.[/color]
>
> 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.[/color]

<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)
  #5  
Old July 20th, 2005, 11:24 AM
Paul
Guest
 
Posts: n/a
Default Re: Text Over an Image?


"Evertjan." <exjxw.hannivoort@interxnl.net> wrote in message
news:Xns9421C72A4E501eejj99@194.109.133.29...[color=blue]
> Paul wrote on 27 okt 2003 in comp.lang.javascript:
>[color=green][color=darkred]
> >> Why is a background-inage undesired? It works perfectly!
> >>
> >> Else use css position:absolute and z-index
> >>
> >> You do not need javascript for that.[/color]
> >
> > 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.[/color]
>
> <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)[/color]

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


  #6  
Old July 20th, 2005, 11:24 AM
Paul
Guest
 
Posts: n/a
Default Re: Text Over an Image?

"Paul" <please@dontemailmedirectly.com> wrote in message
news:bnk07n$ghc$1@wisteria.csv.warwick.ac.uk...[color=blue]
>
> "Evertjan." <exjxw.hannivoort@interxnl.net> wrote in message
> news:Xns9421C72A4E501eejj99@194.109.133.29...[color=green]
> > Paul wrote on 27 okt 2003 in comp.lang.javascript:
> >[color=darkred]
> > >> 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.[/color]
> >
> > <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)[/color]
>
> 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
>[/color]
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


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.