Resize Login & Contact Lightboxes

TheProf - January 21, 2009 - 14:49
Project:Lightbox2
Version:6.x-1.9
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hello,

I hope you are well.

I have been able to successfully install and use lightbox and it is an amazing module. It adds a certain amount of style to my site right away.

I would like to know how to resize the login box and the contact forum lightboxes. They both appear and work fine, but for some reasons their sizes are off -- the login box is too large and the contact forum box is too small (causes sideways scroll-bar to appear).

What do I need to do to change these?

Thank you.

#1

baronmunchowsen - January 22, 2009 - 03:42

Hi,

I changed dimensions via CSS - you can use firebug and/or look at the lightbox css files to work out what you need to change.

Hope this helps.

#2

TheProf - January 22, 2009 - 04:00

Hello,

Thank you for your response.

I didn't think it was in the CSS since I thought it is suppose to dynamically change based on the content loaded within the lightbox. I am still new to CSS and Drupal -- would you be able to point me to which css file / css definition I need to change for the contact box and the login box?

Thank you

#3

TheProf - February 3, 2009 - 14:51

Hello,

I hope everyone is well.

Just a follow-up to my previous message -- any recommendations about how to resolve this issue of resizing the contact form?

Thank you

#4

azinck - September 14, 2009 - 14:16

Not sure if you're still needing this but I just did it for a site I was building. Disable the lighbox login and contact form feature and attach the event handlers yourself.

stick this on the page:

Drupal.behaviors.page_init = function (context) {

//login form
   $("a[@href*='/user/login'], a[@href*='?q=user/login']").each(function() {
    $(this).attr({
      href: this.href.replace(/user\/login?/,"user/login/lightbox2"),
      rel: 'lightmodal[|width:250px; height:210px;]'
    });
  });

//contact form
  $("a[@href*='/contact'], a[@href*='?q=contact']").each(function() {
    $(this).attr({
      href: this.href.replace(/contact?/,"contact/lightbox2"),
      rel: 'lightmodal[|width:450px; height:450px;]'
    });
  });
};

Adjust the width and height for each form to your desired size.

#5

kevin riggen - November 3, 2009 - 17:52

You can also edit lightbox_modal.js

#6

azinck - November 3, 2009 - 18:05

True, but it's usually bad form to modify a module directly since it makes updating the module trickier.

 
 

Drupal is a registered trademark of Dries Buytaert.