Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
John Levy
1,451 PointsHow to position embedded youtube videos
I embedded a youtube video in my HTML code. I cant seem to position it anywhere either than the right hand corner though. It automatically is centered in the center of the page and if I do align="right" it goes to the right but if I do align="left" it just goes back to the center of the page. How do I position the video anywhere I want using iframe? I attached the HTML code below- Thanks in advance
<div id='video'>
<iframe src="https://www.youtube.com/embed/RpRpyCJmL1s"
width="560" height="315" align="left"></iframe>
</div>
1 Answer
John Levy
1,451 PointsHi, I want it to sit like it is shown on this page- http://www.tvisionfitness.com/. Although thats how I want it I also want to know how I can move it anywhere on the page for future sites I might embed a video in. Right now I cant figure out how to move the video around. Thanks John
Chris Shaw
26,676 PointsChris Shaw
26,676 PointsHi John Levy,
Do you have an example page that we can see or a screenshot along with a little bit more code to provide additional context as to how and where the video needs to sit on the page.
Thanks!