Different kinds of glues stick things together in different ways. A lot of them (like Elmer’s glue or wood glue) seep into tiny holes in each material. When they dry, the two items are bonded together by the glue.
Others work by chemically bonding the two surfaces, or in a similar method to Elmer’s, but using a two-part epoxy to harden the bond, rather than drying.
Latest Answers