hey all

i'm having trouble with my lightbox module. when opening a node in a lightframe with IE, i still get a border, the frame has scrollbars and the frame has a margin

i commented out the padding for the following div's in lightbox.css + in my own css -> #imageContainer, #frameContainer, #modalContainer
but when i check the frame with firebug, #frameContainer still gets a padding of 10px which pushes the #lightboxFrame to the right and down.

and in IE still gives scrollbars in the iframe, even when i define scrollin:no when evoking lightframe, and in the css

i don't get the scrolling and border in FF

any ideas ?

thanx in advance!

CommentFileSizeAuthor
#25 iframe-ie.patch897 bytesjoep.hendrix
#22 frameborder.patch892 bytesomerida
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stella’s picture

You can modify these settings at admin/settings/lightbox2/html_content

30equals’s picture

hi stella

well, the only options i see in that page, are the width, height, and border.
and the border is already unchecked. there's no mention of padding or anything like that whatsoever..

stella’s picture

Priority: Critical » Normal

You can modify lightbox padding (called "border size") under "Advanced settings" at admin/settings/lightbox2. This will modify the padding for images, slideshows, lightframes, i.e. everything, not just lightframes.

Cheers,
Stella

30equals’s picture

stella

yup, that solves my padding problem. because the explanation only mentions 'images' i though it didn't apply to lightframes. thank you!

however i still get a frame border... but at least one issue is solved. :)

stella’s picture

Sorry for the delay in responding. Is this still an issue?

blup’s picture

I'm having an issue with the scrollbar as well. Ive fixed all the other problems mentioned above, but despite the setting "scrolling:no", internet explorer keeps showing the scrollbars. Firefox works well though.

stella’s picture

Status: Active » Fixed

You probably need to set the following in your css file for the iframe:

clear: all;
overflow: hidden;

Cheers,
Stella

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

bbence’s picture

Version: 5.x-2.8 » 6.x-1.9
Category: support » bug

In IE, you have to add to the iframe tag the following: frameborder="0"
Rigth now I have modified the ligthbox.js manually.

So Ligthbox2 module should also add this parameter in case the frame is disabled via the admin settings page.

stella’s picture

Status: Closed (fixed) » Active
Jurik’s picture

Title: lightframe - margin & border issues IE » lightframe - margin, border & transparency issues IE 7

I think margin or padding issues are easy to handle with own css. That is a workaround without manipulating the core JS file of lightbox. BUT:

in IE following lines (513, 514) in "lightbox.js" do not take effect:

$('#lightboxFrame').css({'border': 'none'});
$('#lightboxFrame').attr('frameborder', '0');

Same problem with transparency. If you want "no border" and "transparency iframe background" in IE you need to manually add it at line 503:

$('#frameContainer').html('<iframe id="lightboxFrame" style="display: none;" src="'+src+'"></iframe>');

i.e. frameborder="0" and allow_transparency="true"

I guess it's one of those nice IE 'features' NOT to rewrite the display when javascript tries to modify HTML elements with adding attributes or styles.

rwturner’s picture

Does any one know if this is planned to be fixed in the next release? I added frameborder="0" to the appropriate line in lightbox.js as Jurik suggested. That removed the border in ie. Unchecking the check box for the border did not remove it in ie. Would it be possible for the check box to be changed in the next update to add the attribute to the iframe in a more effective way for ie?

samchok’s picture

subscribe

bsorrells’s picture

When I view the source, there is frameborder=0, but there is also style="border: medium none;" ... The Lightbox with the iFrame looks fine in FF, Safari, and Chrome. However, in IE, there is a border that I *cannot* seem to get rid of!

I would love a second set of eyes. You can see the issue here: http://www.presentationproducts.com/portfolio/all

dilari’s picture

same here (#14)..Anyone knows where this can be overwritten?

timos’s picture

Title: lightframe - margin, border & transparency issues IE 7 » lightframe - margin, border & transparency issuesIE 7

Hi,
Same above, with a background color problem too. I set the backgroundcolor to #000000 and in IE the lightboxFrame div still get a white background, even i force the background in CSS file with :

#lightboxFrame {
  background-color:#000000;
}

but if i use the firebug lite to analyse a element in IE the background color property stays to #fffffff.
I really don't understand, because there is nowhere some js instruction to change this propert, and even so, my settings is on black color for background in the administration page for lightbox !

Dubs’s picture

Hi there,

Just a little more insight into the problem...

I copied and pasted the popped up code (i.e. after displayed the lightbox) into a fresh test.html file. When this page is loaded, the frameborder attribute is honoured in IE7, and no border is displayed.

It looks to me like when jQuery is adding the frameborder property with the attr function, IE7 ignores it. Whilst looking for some inspiration, I read about the way pre-IE8 browsers apply attributes and it may not be possible to do this correctly. I'm not sure if this article is relevent as I'm not too experienced with jQuery: -

http://stackoverflow.com/questions/2825533/jquery-setting-onclick-attrib...

To workaround the problem, I've used a lightmodal lightbox instead as the content is all local.

Hopefully this information may help.

Thanks,

David

timos’s picture

Hi and thanks for those informations
How do you use lightmodal ligtbox instead of lightframe ?
Thanks
Timos

timos’s picture

ok i found out :-) does it need only to change the rel attribute rel="lightframe" to rel="lightmodal" ?
I did it but unfortunatly i call some js functions in this modal and it seems they don't work :-(
I will try something else !
Cheers

timos’s picture

Ok,
Finally i fix the problem hacking lightbox.js file, but i'm not very happy about that...
I just add those lines (around l480) :

if (!Lightbox.iframe_border) {
	$('#frameContainer').html('<iframe id="lightboxFrame" frameborder="0" style="display: none; " src="'+src+'"></iframe>');
}
else {
	$('#frameContainer').html('<iframe id="lightboxFrame" style="display: none; " src="'+src+'"></iframe>'); // this line is the original one
}

Should this problem be fix in the next version ?

Cheers

Tim

omerida’s picture

subscribe

omerida’s picture

Status: Active » Needs review
FileSize
892 bytes

Attached is a patch based on #11. It'll set the frameborder attribute to zero if you've disbled it at /admin/settings/lightbox2/html_content, otherwise it'll behave as before. This gets rid of the border when viewed in Internet Explorer.

lubnax’s picture

subscribing

dwb17’s picture

Thank you timos, your solution worked removing scrollbars(IE only) on a lightframe, with Lightbox2 6.x-1.x-dev on a Drupal 6.19 installation.

joep.hendrix’s picture

Version: 6.x-1.9 » 6.x-1.11
FileSize
897 bytes

patch #22 works for me.
here is the same pathc for 6.x-1.11
Please commit!

timos’s picture

Hi
@dwb17, does my solution work to removing scrollbars too ! Nice. I'd just done it to remove frameborder, but it may have on incidence on the scrollbar.

KHofmeyer’s picture

Subscribing, to yet another post to deal with Internet Explorer.

zyxware’s picture

The patch still does not take care of transparency. It looks like IE7 needs allowTransparency="true" set as well.

hacmx’s picture

tested & working in lightbox2 6.1.11 & Drupal 6.22
Cheers!

simon_s’s picture

Please commit the the IE no-border patch of #25. Thanks.

xenophyle’s picture

Version: 6.x-1.11 » 7.x-1.x-dev

This is still a problem in 7, but it looks like an easy fix.

sibopa’s picture

Just to say a big thank you for the patch.
it works just great for me
version = "6.x-1.x-dev"
packaging script on 2011-05-24

This definitely need to get in the next release.

Thank you.