Say I had the following 2 classes. How would I make it so subinfo2 would use all the values from subinfo with just a change in width? .subinfo { width: 877px; height: 200px; text-align: left; padding: 3px; .subinfo2 { width: 900px; height: 200px; text-align: left; padding: 3px;
Here's what I'd do: .subinfo, .subinfo2 { width: 877px; height: 200px; text-align: left; padding: 3px; } .subinfo2 { width: 900px; } Code (markup):
Precisely - since the other width declaration is listed second, it will override the first. That's the cascade part of cascading style sheets.