Solved

Div link does not work properly

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help to align the buttons in a row 2 51
CSS: Making responsive table look nicer 7 37
Change box shadow 1 34
CSS for <center> 14 33
CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

735 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