• 0

Youtube and embedding


Question

I'd like to show some Youtube videos on my website.

The problem is, I set the video to 350 in width, and it fitted into my site fine on my browser settings. Someone else views it on another browser/screen settings and the video spills off-screen. I can't reduce the width, because then it will be too small on my browser and won't fit the page correctly. Is there any way to force the video to not go outside the page?

This is the code I'm using, I tried setting the youtube td width to 350 but it had no effect.


<?php
$youtube = $stats['youtube'];
if( $youtube == TRUE )
{
$youtube = '<table summary="Software or other data table" class="sofT3" cellspacing="0" cellpadding="0" style="text-
align:left;"><tr><td class="youtube"> '.$youtube.' </tr></td></table>';
}
echo $youtube;
?>
[/CODE]

The embed code is in the database by the way.

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

What about a fluid video element height/wide or a absolute placement?

And some visual explanation of your problem or a webpage too show it could help us to understand your problem ^^

Link to comment
Share on other sites

  • 0

What about a fluid video element height/wide or a absolute placement?

And some visual explanation of your problem or a webpage too show it could help us to understand your problem ^^

Here is a screenshot of the issue,

post-103369-0-97233400-1334224265.png

Link to comment
Share on other sites

  • 0

add the video in div box with a fixed width would do the job, the container should be relative or static positioned ofcourse

Link to comment
Share on other sites

  • 0

add the video in div box with a fixed width would do the job, the container should be relative or static positioned ofcourse

Or with a min-width and max-width, and set the min to 350 + padding.

Link to comment
Share on other sites

  • 0

It's actually in a div already, what would you suggest I change this to?


div.matchstats-right{
width:30%;margin:12px 0 0 0;float:right;position:relative }
[/CODE]

Link to comment
Share on other sites

  • 0

Ok I've done that and its stopped it going off-screen, but when I increase the text size the youtube video slides right down the page.

I suppose what I'm after is it to fit in regardless of screen settings.

post-103369-0-28137300-1334238063_thumb.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.