Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
In the following case:
img {
max-width: 100%;
}
in internet explorer 8 the colorbox frame is few pixels large, and the image is not displayed...
I solved the problem setting an additional css property
#cboxLoadedContent img {
max-width: none;
}
Comments
Comment #1
frjo CreditAttribution: frjo commentedI don't believe this CSS comes from the Colorbox module or the Colorbox plugin. I can at least not fins it anywhere in the code.
In what file did you find it?
Comment #2
hutch CreditAttribution: hutch commentedUsing grep
But that does not explain why IE8 is not behaving ;-(
Comment #3
frjo CreditAttribution: frjo commentedYou mean that you yourself add img { max-width: 100%; } in your theme and that breaks Colorbox with IE 8?
Comment #4
DrFoo CreditAttribution: DrFoo commentedI had the same problem.
At least for me, the problem .css is from the theme pixture_reloaded, a sub-theme of adaptivetheme. First I tried the above fix, which worked fine. Then I decided to try just commenting out the offending statement. That didn't work because the same .css statement is in the parent theme as well. Okay, so I track down at.base.css and lo and behold look at this nifty comment and fix:
Now where have I seen that fix before... Finally, killing the max-width statement both there and in the subtheme does in fact fix the colorbox issue, as well as some others I had. Definitely not a Colorbox problem, but having this here helped me find the solution.
Thanks!
Comment #5
palamida CreditAttribution: palamida commentedYes, I use max-width: 100%; for images and needed to disable this for the colorbox display because of the IE problem
Comment #6
ataxia CreditAttribution: ataxia commentedI'm seeing this on a new Drupal 7 site with the Sky theme (also depends on AdaptiveTheme) in IE8 - it's fine on other browsers. I was able to fix the problem by adding this to my custom CSS file:
I don't have this problem with other Drupal 7 sites using the Fusion theme.
Comment #7
mohhess CreditAttribution: mohhess commentedThanks palamida for that you posted and then "Answering" your own question. I had the same issue with IE8, but then I added the CSS to my IE8 specific style sheet and bam...working like magic! Thanks!
Comment #8
crizthx, I can confirm this img max-width: 100% issue! maybe this information should be part of the readme as some base themes come with that by default...
Comment #9
frjo CreditAttribution: frjo commentedCommitted text to the README about this in 7-dev.
Comment #11
ntigh52 CreditAttribution: ntigh52 commentedHi to all,
Please help me,
I have the same issue on ie8.
what I need to do to fix that on ie8?
The code that i try to view in colorbox is: ( not img >
.....
P.S.
I test color box outsite drupal and all work fine colorbox Current version: 1.3.20 | jQuery JavaScript Library v1.4.4
Its sonthing inside the module...
Thanks a lot!!!
Comment #12
ntigh52 CreditAttribution: ntigh52 commentedI dont know why but this issue still active!
all my colorbox link not viewed!
Do you any idea why?
Thanks
Comment #13
ntigh52 CreditAttribution: ntigh52 commentedComment #14
frjo CreditAttribution: frjo commentedPlease don't reopen old issues. Post an new issue with your specific problem.
Comment #15
ntigh52 CreditAttribution: ntigh52 commentedsorry.
I thought it was the same issue....
Comment #16
fedExpress CreditAttribution: fedExpress commentedThank you for fix. Unfortunately, I had this issue too, so I had to add this extra line to CSS (using Zen theme - it has normalize.css file in which img tag has max-width:100%;).
Comment #17
RobW CreditAttribution: RobW commentedExplanation: http://believeinmiraclesx.wordpress.com/2012/08/16/ie8-images-disappear-...