Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 24-07-2009
Member
 
Join Date: Apr 2008
Posts: 68
How to wrap div tag with Hyperlink?

Hi.

I have a question about Div tag & Anchor tag that's a Hyperlink.
What I want to ask you guys is, If its possible to use a whole div as a hyperlink? I mean how can I wrap a hyperlink around the div tag?

Thanks in advance.
Reply With Quote
  #2  
Old 24-07-2009
Member
 
Join Date: Aug 2008
Posts: 69
Re: How to wrap div tag with Hyperlink?

Why don't you do it this way?

Code:
<a href="Homepage.html"><div id="banner"></div></a>
I with this can make the div tag an hyperlink for your banner in this case.

Hope this helps you.
Reply With Quote
  #3  
Old 24-07-2009
Member
 
Join Date: Oct 2008
Posts: 27
Re: How to wrap div tag with Hyperlink?

Why don't you do this with help of Javascript? Its really simple.

Code:
<div onClick="document.location='Homepage.html';"></div>
I know this will work out for you.
All the best.
Reply With Quote
  #4  
Old 24-07-2009
Member
 
Join Date: Nov 2008
Posts: 97
Re: How to wrap div tag with Hyperlink?

I am sure you can do that with both the above suggested methods.
But just I want to notify 2 points here.
1. for the 1st solution I don't think its a good thing since it do not support HTML 4.01
2. For the second its good to use javascript but Can you tell me why don't you use an Image in the div tag & wrap the hyperlink or anchor tag around that Image? It will be accurate method.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to wrap div tag with Hyperlink?"
Thread Thread Starter Forum Replies Last Post
wrap panel in windows phone 7 dinkster Portable Devices 3 26-10-2010 10:45 PM
How to use white space property for CSS to No Wrap Pratyush Software Development 3 07-08-2009 03:42 PM
How to word wrap text in Powerpoint jeffcoo Windows Software 3 12-06-2009 12:06 PM
VBA code to wrap text? grouth Microsoft Project 2 23-09-2008 07:30 PM
In HTML table how can I wrap the text ? Matellis Software Development 5 20-05-2008 07:48 PM


All times are GMT +5.5. The time now is 03:47 AM.