dragonfeet2012
dragonfeet2012

Reputation: 57

Add additional class to Pinterest Pin It Button iframe

I'm having an issue with the Pinterest Pin it button. The Pinterest JS creates an iframe by default. However the iframe is creating unwanted space in my footer. I'm trying to resolve the unwanted spacing by hiding the iframe. I can't hide all iframes since there are others on the page needed. Also the class in the iframe constantly changes so I can't use that.

Is there a way to add either an additional class or ID to the dynamically loaded iframe?

Upvotes: 4

Views: 1318

Answers (1)

kakashigr
kakashigr

Reputation: 124

You can target it like this:

iframe[src^="//assets.pinterest"] {
 display: none;
}

Upvotes: 4

Related Questions