@@ -270,16 +270,28 @@ function galleryformatter_field_formatter_view($entity_type, $entity, $field, $i
 /**
  * Fetch the necessary CSS files for the gallery styles.
  */
 function galleryformatter_add_css($style) {
   // Add galleryformatter CSS.
-  drupal_add_css(drupal_get_path('module', 'galleryformatter') . '/theme/galleryformatter.css');
+  drupal_add_css(drupal_get_path('module', 'galleryformatter') . '/theme/galleryformatter.css', 
+    array( 
+      'type' => 'file', 
+      'group' => CSS_DEFAULT, 
+      'weight' => 1000,
+    )
+  );
 
   if ($style != 'nostyle') {
     $style_css = _galleryformatter_get_style_css($style);
-    drupal_add_css($style_css);
-  }
+    drupal_add_css($style_css, 
+    array( 
+      'type' => 'file', 
+      'group' => CSS_THEME, 
+      'weight' => 1000,
+    )
+  );
+ }
 }

 /**
  * Helper function to get the css file for given style.
  */
