In-depth explanation in this post.
In-process example: align the tabs with bottom edge and keep them above the bar's upper edge.