Image Link on a Block in Drupal 7
The Image Link module doesn't appear ready for Drupal 7, so if you need a workaround for making a block image an active link, you can use CSS. Basically, you place an invisible link field overtop your block image using CSS.
- You'll need the 'Link" module - install that
- Also, install the "node block" module to turn your node into a block
- Create a new link field in your content type and indicate the URL you wish to link to
- Make that link field the top level field, above your image field
- Use the following CSS:
.field-your-custom-name a {
position:absolute;
top:0;
background-image:url("/sites/all/themes/palmsdown/images/blank-im.png");
background-repeat:no-repeat;
width:300px;
height:160px;
text-indent:-99999em;
display: block;
}
CSS explanation: The text indent hides the link text; the width and height is the size of the image; unfortunately for IE, a transparent PNG is required for an active link.




