I'm curious about how nested spans and CSS handle the width attribute. In the HTML code provided, the 'wide' class sets the width while the 'box' class adds a border. I've noticed that the width is only applied when both classes are used together. Can someone clarify why this happens? I'm relatively new to CSS and may have overlooked a basic rule.
<span class="wide"><span class="box">Not wide</span></span>
<span class="wide box"><span>Wide</span></span>
<span><span class="wide box">Wide</span></span>
<span class="box"><span class="wide">Not wide</span></span>
View the effects here: http://jsfiddle.net/7hXUu/2/
Any insights would be greatly appreciated, Aaron