There are at least 6 ways to target IE7 only.

The Star(*) hack

html>body .myClass { *color: #CC33CC; }

The conditional comment

<!--[if IE 7]>
<style type="text/css">
p.conditional {color: #CC33CC;}
</style> <![endif]-->

The LANG filter

.item {color: #000000;}
html>body .item {color: #CC33CC;}
*:lang(en) .item{color: #666666;}
.item:empty {color: #666666 !important}

<body lang="en">
<p class="item"> This will purple in IE7, grey in Firefox and black in IE6

Triple X Hack

.testx { color: #000000; }
p[id$="testy"] { color:#cc33cc; }
p[id$="testy"]:not([class="xxx"]) { color:#666666; }
@media all and (min-width:0px) { p[id$="testy"] { color:#aaaaaa; } }

This will purple in IE7, grey in Firefox and black in IE6

The Case Sensitive Attribute Hack

p.casesensitive {color: #000000;}
body[align~=left] p.casesensitive {color: #cc33cc;}
body[align~=LEFT] p.casesensitive {color: #666666;}

<body align="left"> <p class="casesensitive">
This will purple in IE7, grey in Firefox and black in IE6</p>

Aimsterloo Hack
a.k.a. First Child Comment Hack

p.fchild {color: #000000;}
html>body p.fchild {color: #cc33cc;}
body :first-child p.fchild {color: #666666;}

<body><!-- useless comment --><div><p class="fchild">
The div should be the first child of the body, but in IE it isn't...