How can I have Internet Explorer 7 and 8 installed on Windows 7? [duplicate]

Solution 1:

Use the IE8 Developer Tools (under Tools menu, or press F12). You can set the Browser mode and Document mode to IE7.

I've used this for development, and it has worked well.

Solution 2:

Short answer - you can't

Long Answer - Install Windows XP Mode and run IE7 in that.

EDIT: I have not suggested any other VM solutions as they will require an extra Windows XP licence - Windows 7 Pro, Ultimate and Enterprise include a Windows XP licence to be used in Windows XP Mode

Solution 3:

IE8 does have compatibility mode that can render pages as IE7 would see them. I would not relay on this for testing Javascript but for testing CSS it is fine.