We can set in CSS3 -moz-max-content
(for Firefox) and -webkit-max-content
(for Chrome, Safari) as width
, but it seems -ms-max-content
is not working in Internet Explorer (IE11).
Update: Here is a sample code:
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;