In IE8, the Microsoft introduced a new mode called compatibility mode which would render the page like IE7.
You can see this button next to address bar in stackoverf
Short answer:
Put this in your head tag to tell the browser that your page works in IE 8:
Also as per Jon Hadleys comment, to ensure the latest (not just IE8) rendering engine is used, you could use the following: