Log In · Register

 
 
Closed TopicStart new topic
need help on how to center a youtube video, 2.0 profile
xose
post Jul 6 2009, 12:54 AM
Post #1


Member
**

Group: Member
Posts: 15
Joined: Dec 2008
Member No: 705,878



need help on how to center a youtube video on my profile,
here is my url: http://www.myspace.com/jmv209


my profile is 2.0



CCS
CODE
div.vviidd {
height:250px;
width:500px;
border-top:30px solid red;
border-right:none;
border-bottom:30px solid red;
border-left:none;}


HTML
CODE
<div class="vviidd" style="text-align:center;">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" height="385" width="500">
  <param name="allowScriptAccess" value="never" />
  <param name="allowNetworking" value="internal" />
  <param name="movie" value="http://www.youtube.com/v/NhicNnm0Xw0&autoplay=1" />
  <param name="wmode" value="transparent" />
<embed type="application/x-shockwave-flash" allowScriptAccess="never" allowNetworking="internal" src="http://www.youtube.com/v/NhicNnm0Xw0&autoplay=1" height="385" width="500" wmode="transparent" />
</object></div>



 
Mickey
post Jul 6 2009, 01:17 AM
Post #2


Treasure Pleasure
********

Group: Head Staff
Posts: 11,193
Joined: Oct 2005
Member No: 281,127



Remove the CSS codes for the vviidd class. Replace your HTML codes for the video with this:

CODE
<p style="text-align:center"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" height="385" width="500">
  <param name="allowScriptAccess" value="never" />
  <param name="allowNetworking" value="internal" />
  <param name="movie" value="http://www.youtube.com/v/NhicNnm0Xw0&autoplay=1" />
  <param name="wmode" value="transparent" />
<embed type="application/x-shockwave-flash" allowScriptAccess="never" allowNetworking="internal" src="http://www.youtube.com/v/NhicNnm0Xw0&autoplay=1" height="385" width="500" wmode="transparent" />
</object></p>

That should do it.
 
xose
post Jul 6 2009, 01:19 AM
Post #3


Member
**

Group: Member
Posts: 15
Joined: Dec 2008
Member No: 705,878



thanks, but is there any way to have it the vid cropped like in the profile but centered?
 
Mickey
post Jul 6 2009, 01:40 AM
Post #4


Treasure Pleasure
********

Group: Head Staff
Posts: 11,193
Joined: Oct 2005
Member No: 281,127



Put this in your CSS:

CODE
p.vviidd {height:250px; width:500px; padding-left:35px;}

Replace the left padding value with whatever number until your video is centered. Then, replace your video codes with this:

CODE
<p class="vviidd">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" height="385" width="500">
  <param name="allowScriptAccess" value="never" />
  <param name="allowNetworking" value="internal" />
  <param name="movie" value="http://www.youtube.com/v/NhicNnm0Xw0&autoplay=1" />
  <param name="wmode" value="transparent" />
<embed type="application/x-shockwave-flash" allowScriptAccess="never" allowNetworking="internal" src="http://www.youtube.com/v/NhicNnm0Xw0&autoplay=1" height="385" width="500" wmode="transparent" />
</object>
</p>

See if that gives you the result you're looking for.
 
xose
post Jul 6 2009, 12:03 PM
Post #5


Member
**

Group: Member
Posts: 15
Joined: Dec 2008
Member No: 705,878



thank you very much, :)
it worked
 
Mickey
post Jul 6 2009, 12:18 PM
Post #6


Treasure Pleasure
********

Group: Head Staff
Posts: 11,193
Joined: Oct 2005
Member No: 281,127



Topic closed & moved.
 

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: