1. The PHP conditional I provided should keep it away from excerpts – did you include the entire snippet I provided? I just tried it on my localhost and it didn’t include the div in my excerpts. Make you check the “Execute PHP” checkbox.
2. You can do this:
<?php if ( is_single() || is_page() ) : ?>
YOUR DIV AND HTML IN HERE
<?php endif; ?>