Solved

Div link does not work properly

Posted on 2015-01-19
1
75 Views
Last Modified: 2015-01-27
Hi,

I got a small issue with a page.
I'm using the following CSS to make a div clickable:
.divclick {
	position: absolute;
	display: block;
	width: 100%;
	height: 100%;
	top: 0px;
	left: 0px;
}

Open in new window


This works great in Chrome etc., but not in IE.
In IE the "text" in the div is not clickable. How can I fix that?
I have tried to make the div a higher z-index, but that does not work.

<td style="position:relative;">
	<?php echo $old_fetch['id']; ?>
	<a class="divclick" href="/c/<?php echo $old_fetch['id']; ?>.html"></a></td>

Open in new window

0
Comment
Question by:kgp43
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 40558131
Thers is not text in the link, and you will not get any height in IE if you have no content. Put a non-breaking space in the link:

<a class="divclick" href="/c/<?php echo $old_fetch['id']; ?>.html">&nbsp;</a>

And that should give IE what it needs to expand the size of the box for the link.

Cd&
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question