Firstly, I suggest you learn more on CSS at somewhere like http://www.w3schools.com/css/default.asp.
Basically, In CSS you can apply rules using "#ID" or ".class" or "elementtag". #ID will apply to the element with that ID (since ID's should be unique), .class will apply the rules to all elements with that class and just specifying the element tag will apply the rule to all elements with that tag (e.g. a{} would apply to all a tags (links)).
Since the rules for most of your page is specified using #, you are targeting the ID, hence when you remove the ID things no longer look correct, instead, the class is the unnessary part.
Generally use ids when something is unique, class to things that will be repeated.
Hope that helps.
|