We can set in CSS3 -moz-max-content (for Firefox) and -webkit-max-content (for Chrome, Safari) as width, but it seems -ms-max-co
-moz-max-content
-webkit-max-content
width
-ms-max-co
This works on IE11, Chrome and Firefox
instead of
width: -moz-max-content; width: -webkit-max-content; width: -o-max-content; width: -ms-max-content;
I used
width: auto; white-space: nowrap;