Advertisement:

Author Topic: Trying to embed Twitch to a portal page? Dont Fit Page  (Read 344 times)

Offline greenlungs81

  • Semi-Newbie
  • *
  • Posts: 16
Trying to embed Twitch to a portal page? Dont Fit Page
« 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.

Code: [Select]
<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>

Online Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 18,487
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • There's No Place Like 127.0.0.1
Re: Trying to embed Twitch to a portal page? Dont Fit Page
« Reply #1 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.
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.
  Fooling around with an i7 990X @ 3,47Ghz / 12Gb / Win 10 x64 / 3840x2160


How you can help SMF

"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

Offline greenlungs81

  • Semi-Newbie
  • *
  • Posts: 16
Re: Trying to embed Twitch to a portal page? Dont Fit Page
« Reply #2 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.

Online Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 18,487
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • There's No Place Like 127.0.0.1
Re: Trying to embed Twitch to a portal page? Dont Fit Page
« Reply #3 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.
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.
  Fooling around with an i7 990X @ 3,47Ghz / 12Gb / Win 10 x64 / 3840x2160


How you can help SMF

"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

Offline greenlungs81

  • Semi-Newbie
  • *
  • Posts: 16
Re: Trying to embed Twitch to a portal page? Dont Fit Page
« Reply #4 on: January 09, 2019, 01:46:11 AM »
ok thanks