1
<script src="https://apis.google.com/js/platform.js"></script>

<div class="g-ytsubscribe" data-channelid="UCt7Qb8JdtlG_pO1Pr4w2jrQ" data-layout="default" data-count="default"></div>

I'm inspecting the code above generated on website and I see:

<div id="___ytsubscribe_0" style="text-indent: 0px; margin: 0px; padding: 0px; border-style: none; float: none; line-height: normal; font-size: 1px; vertical-align: baseline; display: inline-block; width: 104px; height: 24px; background: transparent;"><iframe frameborder="0" hspace="0" marginheight="0" marginwidth="0" scrolling="no" style="position: static; top: 0px; width: 104px; margin: 0px; border-style: none; left: 0px; visibility: visible; height: 24px;" tabindex="0" vspace="0" width="100%" id="I0_1459495947902" name="I0_1459495947902" src="https://www.youtube.com/subscribe_embed?usegapi=1&amp;channelid=UCt7Qb8JdtlG_pO1Pr4w2jrQ&amp;layout=default&amp;count=default&amp;origin=http%3A%2F%2Feverydayrelay.com&amp;gsrc=3p&amp;ic=1&amp;jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.en.O7qc2VuIvpU.O%2Fm%3D__features__%2Fam%3DEQ%2Frt%3Dj%2Fd%3D1%2Frs%3DAGLTcCPZ7Tpph6RiCDsul5sXKhzE5OYMaQ#_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart%2Concircled%2Cdrefresh%2Cerefresh%2Conload&amp;id=I0_1459495947902&amp;parent=http%3A%2F%2Feverydayrelay.com&amp;pfname=&amp;rpctoken=13548707" data-gapiattached="true"></iframe></div>

I want it so that vertical-aline has value bottom, not baseline as shown above

how can I specify that since it was generated?

Cœur
  • 37,241
  • 25
  • 195
  • 267
ealeon
  • 12,074
  • 24
  • 92
  • 173

1 Answers1

1

Unfortunately, the code that you have given creates an iframe referencing a different domain to your own.

This means that you are unable to modify the CSS that comes with it.

You can read more about same-origin policy here - https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy

If the iframe comes from the same domain that your page is hosted on, you will be able to change the CSS via JS - More information here

Side note - If it's positioning that you are trying to change, it might be worth trying to wrap the widget in your own div, and apply CSS to that div.

Community
  • 1
  • 1
JayIsTooCommon
  • 1,714
  • 2
  • 20
  • 30