Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Div link does not work properly

Posted on 2015-01-19
1
Medium Priority
?
83 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
1 Comment
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 1500 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

885 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