--- flexible.inc	2007-10-11 16:23:24.000000000 -0400
+++ flexible.inc	2007-11-25 18:08:36.000000000 -0500
@@ -10,7 +10,6 @@ function panels_flexible_panels_layouts(
     'theme' => 'panels_flexible',
     'css' => 'layouts/flexible.css',
     'settings form' => 'panels_flexible_settings_form',
-    'settings validate' => 'panels_flexible_settings_validate',
     'settings submit' => 'panels_flexible_settings_submit',
     'panels function' => 'panels_flexible_panels',
   );
@@ -49,7 +48,7 @@ function panels_flexible_settings_form($
   }
 
   $form['instructions'] = array(
-    '#value' => t('<p>Here you may determine the number of rows and columns your layout may have. Each row can have its own number of columns, and each column can have its width set independently. The widths are set in percentages, and for each row the widths must add up to 100%. When changing the number of rows or columns, click Save to update the form so you can set the widths for new cells properly.</p><p><strong>Note: Removing cells which contain panes will cause those panes to be disappear. Please move any content you wish to keep.</strong></p>'),
+    '#value' => t('<p>Here you may determine the number of rows and columns your layout may have. Each row can have its own number of columns, and each column can have its width set independently. When changing the number of rows or columns, click Save to update the form so you can set the widths for new cells properly.</p><p><strong>Note: Removing cells which contain panes will cause those panes to be disappear. Please move any content you wish to keep.</strong></p>'),
   );
   $form['rows'] = array(
     '#type' => 'textfield',
@@ -59,6 +58,13 @@ function panels_flexible_settings_form($
     '#description' => t('The number of rows this layout can have.'),
     '#default_value' => $settings['rows'],
   );
+  $form['rows_widthtype'] = array(
+    '#type' => 'select',
+    '#title' => t('Width unit type'),
+    '#options' => array('%' => t('% (percentage)'), 'px' => t('px (pixels)'), 'em' => t('em (current)')),
+    '#description' => t('The width unit type this layout can have: %, px or em'),
+    '#default_value' => $settings['rows_widthtype'],
+);
 
   for ($row = 1; $row <= intval($settings['rows']); $row++) {
     $form["row_$row"] = array(
@@ -104,30 +110,6 @@ function panels_flexible_settings_form($
   return $form;
 }
 
-function panels_flexible_settings_validate($values, $form, $display, $layout, $settings) {
-  if ($values['rows'] < 1) {
-    form_error($form['rows'], t('Rows must be a positive integer.'));
-    return;
-  }
-
-  for ($row = 1; $row <= intval($values['rows']); $row++) {
-    // This takes into account whether or even had a previous setting here.
-    if ($settings['rows'] >= $row) {
-      if ($values["row_$row"]['columns'] < 1) {
-        form_error($form["row_$row"]['columns'], t('Columns must be a positive integer.'));
-        return;
-      }
-      $total = 0;
-      for ($col = 1; $col <= intval($values["row_$row"]["columns"]); $col++) {
-        $total += $values["row_$row"]["width_$col"];
-      }
-      if ($total != 100) {
-        form_error($form["row_$row"]['columns'], t('Column widths must add up to 100.'));
-      }
-    }
-  }
-}
-
 function panels_flexible_settings_submit(&$values, $display, $layout, $settings) {
   for ($row = 1; $row <= $values['rows']; $row++) {
     if ($row > $settings['rows'] && empty($values["row_$row"]['columns'])) {
@@ -206,7 +188,7 @@ function theme_panels_flexible($id, $con
       $output .= "<div class=\"panel-col panel-col-$col $class\">\n";
       $output .= "<div class=\"inside\">" . $content["row_${row}_$col"] . "</div>\n";
       $output .= "</div>\n"; // panel-col-$col
-      $css .= "$idcss div.panel-row-$row div.panel-col-$col { width: " . (intval($settings["row_$row"]["width_$col"]) - .02) . "%; }\n";
+      $css .= "$idcss div.panel-row-$row div.panel-col-$col { width: " . (intval($settings["row_$row"]["width_$col"])) . $settings["rows_widthtype"] ."; }\n";
     }
     $output .= "</div>\n"; // panel-row-$row
   }
