 
 
     applyStackedHeights = ($elem, heights, options) ->
+        # Set the explicit height of the element
+        $elem.height((height = options.maxHeight))
+
         top = 0
-
-        # Set the explicit height of the element
-        $elem.height(options.maxHeight)
+        bottom = height
+        reverse = false
 
         $elem.children().each (i, child) ->
             $child = $(child)
             config = heights[i]
 
-            css = top: top
-
-            # Variable elements must have their height explicitly set
+            bottom -= config.height
+
+            # The bottom position is set for fluid elements
             if config.fluid
-                css.height = config.height
+                reverse = true
+                css =
+                    top: top
+                    bottom: bottom
+            else if reverse
+                css = bottom: bottom
+            else
+                css = top: top
 
             $child.css(css)
 

            @$element = $(element).addClass(options.stackedClass)
            @options = options

            # Event handlers
            @_stack = _.debounce(@stack, 50)
            @_scroll = (event) =>
                $child = $(event.target)
                toggleChildOverlay($child, @options)

            @stack()
            @listen()

        overlay: =>

        return


    getFluidChildren = ($elem, options) ->
        $elem.children().filter(options.fluid)


    getStackedHeights = ($elem, options) ->
        remainingHeight = options.maxHeight

        $children = $elem.children()
        $fluidChildren = getFluidChildren($elem, options)

        heights = []

