In my html I have a structure like this: <div id="div1"> <div class="div2"> </div> </div> Nothing fancy just a nested div with the second one using a class. In my CSS I have some rules for div1 followed by rules for div2 like this: div#div1 { margin-left: auto; margin-right: auto; } .div2 { float: left; clear: left; } Now when I use the above I get one set of results. But if I put a semicolon after the closing brace like this: div#div1 { margin-left: auto; margin-right: auto; }; I get different results. My question is this. What does that do? Why do I get different results that way?
I think you get different results because your .div2 style isn't getting read when you put the semicolon in. I could be wrong.
Thanks. No doubt that's what's happening. I'd accidently put that there trying to fix something else. Did that automatically . The programmer in me.