Hello,

I use drupal 7.4 and colorbox 7.x-1.0 and my problem is that the colorbox is not center. Is it possible to center the colorbox with auto height and weight?

I don't find a solution the last days :-( hope you can help me

kind regards
drew29

Comments

frjo’s picture

I need a bit more info than that to help you.

* Du you have an example site where we can see this problem?
* How are you using the Colorbox feature? A standard Image field, manually built links or some other way?

drew29’s picture

Hello frjo,

thanks for your fast reply :-) Ok I have set the link to my profile page. At the bottom of the page you find the link "Hier Klicken, um Informartionen, Kritik oder Anregungen zu geben. " that is my example.

This is a contact form link. And I have a image field too.

hope it helps.

kind regards
drew29

frjo’s picture

I believe you have made an error when setting maxWidth and maxHeight in the Colorbox configurations. They look like this on your site.

"maxWidth":"100%, 1000, 1000px"
"maxHeight":"100%, 1000, 1000px"

You must set only a single value, not three.

The default values are:

"maxWidth":"100%"
"maxHeight":"100%"
ts145nera’s picture

I've the same problem.
frjo, where can I find this?

"maxWidth":"100%, 1000, 1000px"
"maxHeight":"100%, 1000, 1000px"
drew29’s picture

ok now I have test it with

"maxWidth":"100%"
"maxHeight":"100%"

I have clear all caches, but is the same problem.

@ts145nera

these settings are in the colorbox configuration.

hpe it helps

kind regards
drew29

frjo’s picture

@drew29, when I look at your page it still says:

"maxWidth":"100%, 1000, 1000px"
"maxHeight":"100%, 1000, 1000px"

Please go to the Colorbox configuration page and double check the settings there.

@ts145nera, you can find the Colorbox settings on the Colorbox configuration page. Go to "Configuration" and then to "Colorbox".

drew29’s picture

Hello frjo,

I have test it and save these settings again. hope it helps.

kind regards
drew29

drew29’s picture

Hej Hej,

I have not found a solution. Can you help me again?

kind regards
drew29

frjo’s picture

In the CSS for your theme you have set:

body {
  position: relative;
}

That seems to throw Colorbox of course a bit. Removing it fixes the Colorbox centring problem.

If you don't need the relative attribute it's a simple fix. If you do, you will have to restructure the theme a bit.

drew29’s picture

Status: Active » Fixed

Hello frjo,

thanks a lot to solve the problem. Now it works perfect :-)

kind regards
drew29

Status: Fixed » Closed (fixed)

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