You can target Yahoo! Mail by using the @media yahoo media query and adding your styles.
Yahoo! Mail HTML codes
Gmail and Yahoo! Mail add a spacing between images. This issue first showed up when viewing emails in Firefox and later spread across other modern browsers including IE, Chrome, Opera, and Safari.