Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Closed Thread
How to add hyperlink in td background image?
Old 11-21-2010, 09:39 AM How to add hyperlink in td background image?
Banned

Posts: 408
Name: mushget
Trades: 0
Hey guys,
see this following coding
There is a image logo2.png
I want it to add hyperlink to the image .. but i am not able to do it.. plz help me
Code:
<td background="{THEME}/images/logo2.png"></td>
mushget is offline
View Public Profile Visit mushget's homepage!
 
 
Register now for full access!
Old 11-21-2010, 09:52 AM Re: How to add hyperlink in td background image?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
First, why are you using tables?
Rather than putting the logo in as a background image, put the logo image on the page and wrap it in the <a> tags. If you do that, make sure that the image has proper alt text.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
View Public Profile
 
Old 11-25-2010, 04:17 AM Re: How to add hyperlink in td background image?
MattCA's Avatar
Junior Talker

Posts: 2
Name: Matt
Location: Rumia
Trades: 0
Quote:
Originally Posted by mushget View Post
Hey guys,
see this following coding
There is a image logo2.png
I want it to add hyperlink to the image .. but i am not able to do it.. plz help me
Code:
<td background="{THEME}/images/logo2.png"></td>
You can bind JS action to td as onClick, or put a tag inside td and stretch it with CSS to width&height=100%, also make sure to display it as block element.
__________________
My Seo blog -
Please login or register to view this content. Registration is FREE
MattCA is offline
View Public Profile Visit MattCA's homepage!
 
Old 11-28-2010, 05:53 PM Re: How to add hyperlink in td background image?
Mug
Skilled Talker

Posts: 78
Trades: 0
Don't use JS for the click if it is literally is just for linking to the home page. Just use the a element. I agree with the above, why are you using tables at all for this sort of thing? Steer clear.
__________________
Mug

Please login or register to view this content. Registration is FREE
Mug is offline
View Public Profile
 
Old 12-03-2010, 01:09 PM Re: How to add hyperlink in td background image?
Skilled Talker

Posts: 59
Name: Lisa Forgan
Location: Colorado
Trades: 0
Another method is just using your <a> tag and in the css make it a background- image, define the width and height, and make it display:block.
Puddlemut is offline
View Public Profile
 
Old 12-04-2010, 01:31 AM Re: How to add hyperlink in td background image?
Banned

Posts: 143
Name: maheshadodis
Location: USA
Trades: 0
just add a div in side td and give hyperlink to it and image will be background of the div !!
maheshadodis is offline
View Public Profile
 
Old 12-08-2010, 01:40 AM Re: How to add hyperlink in td background image?
Html Web Design's Avatar
Experienced Talker

Posts: 31
Name: WP Themes
Location: Nagpur
Trades: 0
In this example we have a simple link within a div

Code:
<div id="example-link">
  <a href="#">Link to journal article</a>
</div>

The CSS

Code:
#example-link a { 
  padding-left: 15px; 
  background: url(/images/examples/bglinks/pencil_icon.gif) 3px 1px no-repeat; 
}
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
Html Web Design is offline
View Public Profile Visit Html Web Design's homepage!
 
Old 12-15-2010, 09:52 PM Re: How to add hyperlink in td background image?
Novice Talker

Posts: 6
Name: Jibin Padmanabhan
Trades: 0
Code:
<td background="{THEME}/images/logo2.png">
<a href="#"><img src="{THEME}/images/transparent-image.gif" /></a>
</td>
This is a method designers used for hperlinking and protecting a background image.

Last edited by jibin; 12-15-2010 at 09:54 PM..
jibin is offline
View Public Profile Visit jibin's homepage!
 
Old 12-16-2010, 01:12 AM Re: How to add hyperlink in td background image?
Novice Talker

Posts: 6
Trades: 0
Quote:
Originally Posted by MattCA View Post
You can bind JS action to td as onClick, or put a tag inside td and stretch it with CSS to width&height=100%, also make sure to display it as block element.
This is a horrible way. Not only does it disregard web standards. But it also makes the link un clickable for those with JS disabled.

OP: I suggest you move away from using tables. And go read up on w3 compliance.
WuLF is offline
View Public Profile
 
Old 12-16-2010, 10:48 PM Re: How to add hyperlink in td background image?
Banned

Posts: 14
Trades: 0
then have a look at this.

Try this code:

<td background="{THEME}/images/logo2.png" onclick="window.open('http://...')"></td>
marshal is offline
View Public Profile
 
Old 12-16-2010, 11:26 PM Re: How to add hyperlink in td background image?
Banned

Posts: 143
Name: maheshadodis
Location: USA
Trades: 0
Quote:
Originally Posted by jibin View Post
Code:
<td background="{THEME}/images/logo2.png">
<a href="#"><img src="{THEME}/images/transparent-image.gif" /></a>
</td>
This is a method designers used for hperlinking and protecting a background image.
Hi,
Why we wanted to give twice a image just it can be loaded in background of div instead of loading it in td once and dirctly in img tag
maheshadodis is offline
View Public Profile
 
Old 12-18-2010, 11:52 AM Re: How to add hyperlink in td background image?
Junior Talker

Posts: 1
Name: Blitzerr blaster
Trades: 0
in td its look stranger , i think div method is best to use background image there .

removed

Last edited by chrishirst; 12-18-2010 at 02:47 PM..
blitzbeats is offline
View Public Profile
 
Old 12-18-2010, 02:04 PM Re: How to add hyperlink in td background image?
Experienced Talker

Posts: 27
Trades: 0
It works the same buy creating an image to fill the entire TD, and wrap it with an <a> tag.
__________________

Please login or register to view this content. Registration is FREE
from as low as $10
kineticsem is offline
View Public Profile Visit kineticsem's homepage!
 
Closed Thread     « Reply to How to add hyperlink in td background image?
 

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.44685 seconds with 12 queries