A little background information:
My husband's best friend grew up next door to me, I've known him all my life. We were close friends until my husband and I started getting serious, then I stopped hanging out with without my husband there. He and my husband met in college and he's ultimately the one that hooked us up. Since they've known each other they've always given each other shit constantly. That's just how they are (actually, I think that's how most guys are with their friends). About 5 years ago our friend went through a divorce and after that his jokes to my husband got a little mean-spirited. When he gets like that he puts my husband down in any way he can (calling him a pussy, saying he has a small dick, etc.. Basically making himself out to seem more masculine than my husband any way he can). My husband always said just to let it go, it was because he was going through a hard time. He's always been a little immature so I just ignored it.
He got remarried about a year ago to a really sweet girl and they're really happy, but the jokes never stopped. Every time we're all together or hanging out in a group he manages to squeeze in at least one put down, but my husband is really good about either giving it right back or just shutting him down completly. Normally I would think that this is just two immature boys being boys, but now he makes these comments to me when my husband isn't around. Constantly. A few weeks ago we were at a mutual friend's BBQ and I was standing talking to his wife and a few other women and he came up and put his arm around me and said "So how does it feel being with a guy with such a tiny, tiny dick?" which was like the 5th time we've been out in public that he said something like this in front of people as soon as my husband walked away (and for the record, it isn't true. Not at all. lol) . I said "Why are you so obsessed with my husband's penis? I think you have it on your mind more than I do." and he said something like "It's hard not to because it's so little" or something. I've tried defending him saying "He actually has the biggest that I've ever seen." and he always says "That's because you haven't been with a _____ guy." (he's a different race than I am)
It happened again yesterday. He and his wife went out of town over the weekend and we kept their dog for them. He came over yesterday to pick her up and when he walked in I was trying to put up a shelf that my kids had knocked down. It's a huge shelf and I was having trouble holding it over my head long enough to put it up without falling off the step ladder. He took it from me and put it up and said "Why don't you have your husband doing this kind of thing for you?" and I said "Because he's at work right now. I can handle it." and he said "He's probably too much of a pussy anyway."
So my question is, how would you handle this? I've made it clear that I don't like him talking about my husband that way but all that seems to do is make it worse. My husband is really good with comebacks so he never says things like this when he's around anymore. When we were kids he used to say things that would make me blush because he thought it was funny so I think he's doing it because it makes me so flustered, but I never know how to respond to this kind of thing. I know this makes him seem like a huge asshole, but he's really not. 98% of the time he's a really great guy, he's been an awesome friend to my husband for over 10 years, it just seems like anytime we're around a big group of people, or he's alone with me he has to put my husband down. Avoiding him isn't possible, we hang out with them about once a week and we have all of the same friends so we see them about every where we go. Ladies, what would you do? Guys, is there a reason he's doing this, and how do I make it stop?