As specified in the answer of difference between width auto and width 100 percent the width auto takes full width but in this demo the width auto doesn't take the full width but when we apply 100% to this then only it takes full width. How the width auto takes its element actually?
Demo summary
html
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
css
ul{background-color: gray;}
li{background-color: red; float: left; clear: left; width: auto;}