I have a question on nested spans and how CSS applies the width attribute. The HTML is like this, the 'wide' class sets the width. The box class gives it a border. Width gets applied only if I have wide and box together. Can someone explain to me why this is the case? I am CSS amateur, maybe this is some basic rule that I missed.
<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>
You can see the effect here: http://jsfiddle.net/7hXUu/2/
Thanks for any insight, Aaron