The best solution uses vertical-align, as @FelixAJ said. The problem is mainly related to the overflow that causes the inner text. Using vertical-align, you override this default behavior. In addition, I recommend using min-widthinstead widthto avoid overflow. With this approach, the width of the bar will increase depending on the internal text.
user7126329
source
share