1

I have a wordpress blog and am wanting to put the youtube subscribe widget in the widgets bar. The only thing is that it is really ugly :(

It is an iframe so I cant change the CSS easily but I think maybe I can do it with jQuery?

<iframe id="fr" src="http://www.youtube.com/subscribe_widget?p=[add  YouTube Username here]" style="overflow: hidden; height: 105px; width:  300px; border: 0;" scrolling="no" frameBorder="0"></iframe>

I just want to get rid of the black border really.

would love some help. Thanks

Joshua Tall Guy
  • 227
  • 1
  • 2
  • 7

1 Answers1

0

This is not possible to do with jQuery - this kind of activity is blocked by the same-origin policy. It's a useful thing to do, but also opens up all kinds of security holes.

However, the widgets themselves are customizable. Take a look here for some ideas.

blueberryfields
  • 45,910
  • 28
  • 89
  • 168
  • Thanks blueberry fields! some one told me I can do it with something like this but I guess the Same origin policy stops this? http://stackoverflow.com/questions/3714880/how-to-apply-css-to-iframe-content – Joshua Tall Guy Aug 21 '13 at 20:35
  • The question you linked even says: " Mind you, it has to be same domain/ports etc, so that's why my example features jsfiddle in the iframe". It only works if you're changing code that's served from your own site - you won't be able to modify youtube's frame. – blueberryfields Aug 21 '13 at 20:54