Solved

Div link does not work properly

Posted on 2015-01-19
1
69 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 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

"I want to put my photos online, but I don't want them stolen.  What settings should I use?" When You Put Photos Online First and foremost, any digital file published on the WWW can be copied, stored, modified, retransmitted, etc.  Remember Naps…
When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now