         'padding-right': paddingH
       )
       width = @$current.width()
-      paddingV = "#{(height - width/@options.ratio)/2}px"
+      height = width / @options.ratio
+      paddingV = "#{(height - height)/2}px"
       @$sections.css(
         'padding-top':    paddingV,
         'padding-bottom': paddingV

        'padding-bottom': paddingV
      )
      height = @$current.height()
      paddingH = "#{(width - @options.ratio*height)/2}px"
      @$sections.css(
        'padding-left':  paddingH
        'padding-right': paddingH
      )
    else
      min = width
      paddingH = @options.minPadding
      @$sections.css(
        'font-size':      "#{min * 0.4}%"

    $(window).on('hashchange', @checkHash)

  resize: ->
    [outerWidth, outerHeight] = [$(window).width(), $(window).height()]
    if outerWidth > @options.ratio * outerHeight
      min = outerHeight
      paddingV = @options.minPadding
      @$sections.css(
        'font-size':      "#{min * 0.4}%"
