How to fix CSS label width style not taking effect?

Spread the love

Sometimes, we want to fix CSS label width style not taking effect.

In this article, we’ll look at how to fix CSS label width style not taking effect.

How to fix CSS label width style not taking effect?

To fix CSS label width style not taking effect, we make the label element an inline block element.

For instance, we write

label {
  padding-left: 26px;
  width: 125px;
  text-transform: uppercase;
  display: inline-block;
}

to add display: inline-block; to make label elements an inline block element.

Conclusion

To fix CSS label width style not taking effect, we make the label element an inline block element.

Leave a Reply

Your email address will not be published. Required fields are marked *