[SOLVED][Drupal Colorbox] Colorbox is not centered

| | 1 min read

A Drupal user reported that Colorbox is not centered in his Drupal site. If you are facing the same issue with Colorbox in your Drupal site then read on to find out the solution.

Here is the solution that solved the issue for the user.

  • First make sure that the maxWidth and maxHeight in the Colorbox configurations is set to only a single value. This issue can occur if there are multiple values there. The default values are
  • If the issue persists check if you have set
    body {
      position: relative;
  • If the relative tag is not essential then the fix is simple otherwise you will have to restructure the theme a bit.

Hope that helps.

The easiest way to solve a Drupal issue is to hand it to the Drupal experts. We can provide a wide range of Drupal services to help you maintain and manage your Drupal websites. Get in touch with us to know more.