Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I'm having a small issue with the colorbox module and was hoping I could be enlightened :D
I would like to apply a float to the preview images I see on a given node. Which I can do by applying a float property to the cboxElement class using CSS. This is where my issue arises; when I add the float property it seems to break colorbox. My images are no longer clickable, thus the colorbox module doesn't work. Any advice on this would be great!
Thanks!
Austin
Comments
Comment #1
frjo CreditAttribution: frjo commentedThe classes that start with "cbox*" are internal to the Colorbox plugin. Best to use some other classes, Drupal usually add plenty of div tags and classes around fields so it should be no problem targeting the image.
Comment #2
dubbajubba CreditAttribution: dubbajubba commentedThanks for the reply frjo. I did some experimenting with your advice, and found that regardless of the class I'm trying to affect, I get the same issue.
There is one thing I am now noticing. The colorbox functions do actually still work, but when I float the images the clickable area shrinks to only the top ~20px of the image. Any thoughts?
Thanks,
Austin
Comment #3
dubbajubba CreditAttribution: dubbajubba commentedComment #4
frjo CreditAttribution: frjo commentedSomething is up with your CSS, I can't replicate this. Give me a link to a example of this problem and I can take a look.
Comment #5
Neslee Canil Pinto