Added 'top' and 'bottom' support

Made it support top and bottom tabs.