I bought a can of "Great Stuff" at Home Depot. It is a liquid that is sprayed out of an aerosol can. The liquid rapidly expands and then hardens. I used it to seal around some pipe openings in the garage wall -- just spray the stuff into the opening and it seals against insects and rodents.
Here's a video that gives an idea of how this stuff behaves:
http://www.youtube.com/watch?v=uloK98jMTGY
It's available at other retailers, too, but here is Home Depot's page on it:
http://www.homedepot.com/webapp/wcs/stores/servlet/ProductDisplay?productId=100003351&storeId=10051&langId=-1&catalogId=10053&ci_sku=100003351&ci_kw={keyword}&kwd={keyword}&cm_mmc=shopping-_-googleads-_-pla-_-100003351&ci_gpa=pla#.URGCwWdZMa8
Here's a video that gives an idea of how this stuff behaves:
http://www.youtube.com/watch?v=uloK98jMTGY
It's available at other retailers, too, but here is Home Depot's page on it:
http://www.homedepot.com/webapp/wcs/stores/servlet/ProductDisplay?productId=100003351&storeId=10051&langId=-1&catalogId=10053&ci_sku=100003351&ci_kw={keyword}&kwd={keyword}&cm_mmc=shopping-_-googleads-_-pla-_-100003351&ci_gpa=pla#.URGCwWdZMa8