0

I want to show images on my website. website example

When I hover over the images, the page title shows up. But when you move with your cursor over the text it won't link to my colorbox popup. How can I solve this problem. I've been looking for a long time.

I've used the rewrite results to get the title on hover.

4
  • this is a css/js issue but basically since the z index of your text is above your image, it as you see covers over that part of the image (and link) and therefore doesn't acknowledge the click. what you'll have to do is either use js and look into bubbling and capturing of events or to use rewrite to make this span clickable as well with the same code as the underlying image.
    – Jimajamma
    Commented May 12, 2014 at 20:29
  • Will have to do it with rewrite because i want to use as less js as possible. First I have my Title field and then Image field. I excluded my title field and put this rewrite in image field. <div class="image-hover"> [field_image] <span class="image-overlay">[title]</span> </div> i have to add an <a href=""> ? Commented May 12, 2014 at 20:32
  • For the info, I use the field slideshow module in views. Commented May 13, 2014 at 8:47
  • Please add the extra information to the question. The users who votes to close a question don't look for comments, whose purpose is not making a question clearer.
    – avpaderno
    Commented May 25, 2014 at 8:05

1 Answer 1

0

There are 2 solutions:

  1. use title as the text and it will automatically redirects you to the content page when you click on it.

  2. in your views add the path field to your fields,

enter image description here

apply it and now check the exclude from display checkbox in its setting. go to Rewrite Results and set these settings:

enter image description here

click ok and move the path field at the top of the fields.

enter image description here

Now click on the field that displays your text on the image and set these settings:

enter image description here

Now that field will be a link to your content.

3
  • I got this working but I want to link the title to open my colorbox popup not the node Commented May 13, 2014 at 15:40
  • pointer-events:none did the trick! Commented May 13, 2014 at 19:04
  • @user2301868 if it is not important to yuo to use colorbox, you can use tinybox (sandbox.scriptiny.com/tinybox2) it does the same thing. then use the title href as the url.
    – M a m a D
    Commented May 14, 2014 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.