Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,471
There are 1647 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

Need easy to understand way to center youtube embedded in wordpress

Thread title: Need easy to understand way to center youtube embedded in wordpress
Reply    
    Thread tools Search this thread Display Modes  
09-13-2009, 03:17 AM
#1
Helloguys is offline Helloguys
Status: I'm new around here
Join date: Sep 2009
Location:
Expertise:
Software:
 
Posts: 3
iTrader: 1 / 100%
 

Helloguys is on a distinguished road

  Old  Need easy to understand way to center youtube embedded in wordpress

Hello,

Two questions:

[1] Everytime i need to embed a youtube video, i need to check off "Disable the visual editor when writing" under profile...is that true?

[2] How to center the youtube videos.

If this is the code :

<object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/anBRO5C2WBY&hl=en&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/anBRO5C2WBY&hl=en&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object>

how to modify it to center it?

thanks

Reply With Quote
09-13-2009, 06:06 AM
#2
DrunkAdmin is offline DrunkAdmin
Status: I'm new around here
Join date: Apr 2009
Location:
Expertise:
Software:
 
Posts: 2
iTrader: 2 / 100%
 

DrunkAdmin is on a distinguished road

  Old

Originally Posted by Helloguys View Post
Hello,

Two questions:

[1] Everytime i need to embed a youtube video, i need to check off "Disable the visual editor when writing" under profile...is that true?

[2] How to center the youtube videos.

If this is the code :

<object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/anBRO5C2WBY&hl=en&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/anBRO5C2WBY&hl=en&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object>

how to modify it to center it?

thanks
You can use plugins such as http://wordpress.org/extend/plugins/...deo-quicktags/

Reply With Quote
09-13-2009, 06:55 AM
#3
FWebDe is offline FWebDe
FWebDe's Avatar
Status: Junior Member
Join date: Jul 2009
Location: Vancouver, Canada
Expertise: Programming
Software: Firefox, Vim, Komodo Edit
 
Posts: 69
iTrader: 0 / 0%
 

FWebDe is on a distinguished road

Send a message via MSN to FWebDe

  Old

I'm not sure if this applies to this, but try adding style="margin: 0 auto;" to the 'object' tag.

(Of course, you shouldn't be using inline styles, but this is just to see if it works. Later, you can include this in the CSS)

Reply With Quote
09-13-2009, 07:53 AM
#4
Trim is offline Trim
Status: Member
Join date: Sep 2009
Location:
Expertise:
Software:
 
Posts: 184
iTrader: 1 / 100%
 

Trim is an unknown quantity at this point

  Old

He wants to center so margin: auto 0; i think as 2nd value is horizontal.

But it`s gonna work only if your site generaly is centered, if not is not gonna inherit center position. Correct me if i`m wrong.

Reply With Quote
09-13-2009, 05:19 PM
#5
FWebDe is offline FWebDe
FWebDe's Avatar
Status: Junior Member
Join date: Jul 2009
Location: Vancouver, Canada
Expertise: Programming
Software: Firefox, Vim, Komodo Edit
 
Posts: 69
iTrader: 0 / 0%
 

FWebDe is on a distinguished road

Send a message via MSN to FWebDe

  Old

Oh, if you want it centered vertically, I think you can do something like
Code:
position: absolute;
top: 50%;
You may need to set the container that it is inside to position: relative.

Reply With Quote
Reply    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed