John McCain's staunch opposition to gay marriage was one of the key parts of his presidential campaign. But it has become clear this was not supported in his own household. His daughter, Meghan, is a vocal advocate of gay rights. Now his wife, Cindy, has appeared in a poster campaign against California's proposition 8 – a law banning same-sex marriage.

The move has shocked and delighted gay rights campaigners and led to questions about the state of the McCains' own marriage.

Cindy McCain appears in the poster with silver duct tape across her mouth and the campaign slogan, "NOH8", marked on her cheek.

Unveiling the image on his website, Adam Bouska, the founder of the campaign, said: "In the year since we've started the NOH8 Campaign we've often been surprised at some of the different individuals who have approached us showing their support. Few, though, have surprised us more than Cindy McCain.

"Aligning yourself with the platform of gay marriage as a Republican still tends to be very stigmatic, but Cindy McCain wanted to participate in the campaign to show people that party doesn't matter."

John McCain's office said in a statement that he respected the views of his family but remained opposed to gay marriage. "Senator McCain believes the sanctity of marriage is only defined as between one man and one woman," it said. In 2008 McCain backed a measure in his home state of Arizona to ban same-sex marriage.

Meghan McCain also appears in the poster campaign. "I couldn't be more proud of my mother for posing for the NOH8 campaign," she wrote on Twitter. "I think more Republicans need to start taking a stand for equality.

"I was there when she did it and I almost started crying during the photo shoot."

Bloggers are suggesting that Cindy McCain's move is a deliberate public dig at her husband. Writing on gossip site Gawker, Maureen O'Connor praised both Cindy McCain and Elizabeth Edwards, the wife of the 2008 Democratic presidential hopeful John Edwards, for defying their husbands on gay marriage.

"Is it a coincidence that these two couples are also in the public eye over marital woes?" she wrote.

Pam Spaulding, who blogs on gay issues, was reminded of an infamous and foul-mouthed bust up between John and Cindy during a campaign in 1992. "Given the Senator's hot temper, and the fact that he called his wife a trollop and 'you c*nt' … this was a nice 'screw you' for picking that dimwit Palin and derailing the campaign," Spaulding wrote. (The asterisk is Pam Spaulding's, not ours.)