Making a HTML element’s width equal to its contents

Today I learned how to make a HTML element’s width equal to its contents.

Basically you use CSS and set the element’s “display” property to “inline-block”.

Leave a Reply