Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: greenlungs81 on January 09, 2019, 12:44:51 AM

Title: Trying to embed Twitch to a portal page? Dont Fit Page
Post by: greenlungs81 on January 09, 2019, 12:44:51 AM
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>
Title: Re: Trying to embed Twitch to a portal page? Dont Fit Page
Post by: Aleksi "Lex" Kilpinen on January 09, 2019, 12:51:15 AM
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.
Title: Re: Trying to embed Twitch to a portal page? Dont Fit Page
Post by: greenlungs81 on January 09, 2019, 01:04:55 AM
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.
Title: Re: Trying to embed Twitch to a portal page? Dont Fit Page
Post by: Aleksi "Lex" Kilpinen on January 09, 2019, 01:22:05 AM
Well, because we are not behind either - I think you might want to ask SimplePortal or Twitch.
Title: Re: Trying to embed Twitch to a portal page? Dont Fit Page
Post by: greenlungs81 on January 09, 2019, 01:46:11 AM
ok thanks