Tareq Tareq - 3 months ago 13
CSS Question

How can I expand an <a> tag into a <div> Tag?

I have the following div:

<div style="height: 200px">
<a href="#">Click to View</a>

I want to click anywhere of the div tag and want to activate the tag means in short I want to click on the Div to navigate the link. How can I do that?

Thanks in advance for helping me.


Sorry friends, I have to update my question...

  1. I can not define the exact height of my

  2. I have to use 100% for height for

My revised code is like that:

<a href="#">Click to View</a>

Please help me...


Make a Javascript function which calls the Link and attach it on the OnClick event of the DIV Element.

Or try something like:

<div id="Idhere" onclick="window.location = 'Link here'">
<a href="leave this blank">text here</a>