Add CSS class to a div in code behind

I have a div and I am trying to add a CSS class to it in code but I receive the following error when I try

Property or indexer ‘System.Web.UI.HtmlControls.HtmlControl.Style’ cannot be assigned to — …

How to hide part of the image?

I need to do this:

if the image has an height higher of 100px then hide the rest of the image ( example: image with height of 80px -> show full image, image with height of 150px -> show only the …

HTML CSS Image won’t center?

I am trying to center an image that is located within a div, which is then located inside of another div. Not to worry, I will post some code so you can all see what the heck I’m talking about here.

Keep footer with variable height on bottom

I need to keep a footer on bottom, but its height is variable so main solutions are not suitable for me…

examples of what I can’t do:
http://www.cssstickyfooter.com/
http://matthewjamestaylor.com/…