News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Trying to embed Twitch to a portal page? Dont Fit Page

Started by greenlungs81, January 09, 2019, 12:44:51 AM

Previous topic - Next topic

greenlungs81

I'm trying to embed Twitch to a portal page but the embed dint fit the page like i need it to . i can make it smaller but not bigger to fit the page.

<html>
  <body>
    <!-- Add a placeholder for the Twitch embed -->
    <div id="twitch-embed"></div>

    <!-- Load the Twitch embed script -->
    <script src="https://embed.twitch.tv/embed/v1.js"></script>

    <!-- Create a Twitch.Embed object that will render within the "twitch-embed" root element. -->
    <script type="text/javascript">
      new Twitch.Embed("twitch-embed", {
        width: 1000,
        height: 540,
        channel: "Greenlungs81"
      });
    </script>
  </body>
</html>

Aleksi "Lex" Kilpinen

How about using relative measures?
Ie.
      width: "100%",
      height: "100%",

I know Twitch supports those. Other than that, can't help you much without knowing more - where are you actually placing this, does twitch allow stretching, and so on... not really an SMF issue either IMO.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

greenlungs81

when i try to use the % it dont show it at all when it says i can do that.
and im putting it on its own page from simple portal.
I didnt know if it a prob with the twitch or simple portal.

Aleksi "Lex" Kilpinen

Well, because we are not behind either - I think you might want to ask SimplePortal or Twitch.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF


Advertisement: