Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Float YouTube Embedded Video

Posted on 2010-08-18
6
Medium Priority
?
766 Views
Last Modified: 2012-06-21
I am trying to float a YouTube embedded video on my site.  I surrounded video with a div tag but it is still not working.  What am I doing wrong?

http://myrockyknoll.com/index_new.asp

 #video_new
 {
 z-index:1;
 float:right;
 }
<div class="video_new"><object width="300" height="224" class="video"><param name="movie" value="http://www.youtube.com/v/kUGnrQLU7mw?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/kUGnrQLU7mw?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="300" height="224"></embed></object>
   </div>

Open in new window

0
Comment
Question by:nsitedesigns
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 400 total points
ID: 33466846
You need to declare a width on the floated element.
0
 

Author Comment

by:nsitedesigns
ID: 33466897
Nope.  That didn't work.  : (
      

http://myrockyknoll.com/index_new.asp
http://myrockyknoll.com/rk.css
#video_new
 {
 z-index:1;
 float:right;
 width:300px;
 }

Open in new window

0
 
LVL 4

Accepted Solution

by:
Morrisproject earned 1600 total points
ID: 33466912
ok.... where to start :-)

Firstly on the link, it is in a <p> tag the div you mentioned does not exist on the live page.

Now for your code you have given the div a class, but in your CSS your referring to an ID (#).

Change the CSS to be this:
.video_new
 {
 z-index:1;
 float:right;
width:100%;
text-align:center;
 }

NB: Note the change of # to a (.) instead. You can play with the other properties when it starts to move :-)
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 33466915
Right now I don't see a div tag for the video on index_new.asp...
0
 

Author Comment

by:nsitedesigns
ID: 33466954
Morrisproject:  The div tag was there but I was trying to fix it so when you went in to look, maybe it was during my attempt to fix. I did replace the # with a . and that did the trick.  I thought # was for if there was no other instance of this div on the website.
0
 
LVL 4

Expert Comment

by:Morrisproject
ID: 33467191
You are correct if that would be the only instance you can use a #

However, that means the div would be an id, so the HTML would be
<div id="video_new">.....

As it was a class, you need a dot instead, which also means the same properties can be applied to another video in the same class in the page...
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question