diff --git a/layout.module b/layout.module
index 3a54e4c..92282e9 100644
--- a/layout.module
+++ b/layout.module
@@ -288,18 +288,15 @@ function layout_breakpoint_get_css($include_media_queries = TRUE) {
   foreach ($breakpoints as $name => $breakpoint) {
     if ($include_media_queries) {
       $first_breakpoint = $breakpoint_index == 0;
-      $last_breakpoint = ($breakpoint_index == ($breakpoint_count - 1));
 
       // Build the media query for this breakpoint. The first item should not have
       // a min-width (open ended to 0), and the last item should have no max-width
       // (open-ended to infinity). Mid-items should both have a min-width and a
       // max-width.
       $breakpoint_css[] =
-        '@media screen and (' .
-        ($first_breakpoint ? '' : 'min-width:' . $min_width) .
-        ((!$first_breakpoint && !$last_breakpoint) ? ') and (' : '') .
-        ($last_breakpoint ? '' : 'max-width:' . $breakpoint->width) .
-        ') {';
+        '@media screen ' .
+        ($first_breakpoint ? '' : 'and (min-width: ' . $min_width . ') ') .
+        '{';
       // Get grid CSS from gridbuilder and apply some extra indentation.
       $breakpoint_css[] = '  ' . str_replace("\n", "\n  ", gridbuilder_get_css($breakpoint->grid_name, '.panel-responsive', '.rld-span-' . $name . '_'));
       $breakpoint_css[] = "\n}";
