It looks like you need to work a bit on your stylesheet knowledge.
You are mixing up the distinction between class and style.
The style contains the style values and these are referenced by either
the class name or id name. (very much in brief).
I suggest you start by writing out each element with the styles hard
coded. Then write out each variation you require. Get these working
so that the styles are correct. If you need style help then go to a
css group such as Css-discuss.
Once you have your styles correct then you will see which vaues you
need to change and then you can work out what you need to do to change