Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: Center a Video on Wordpress

  1. #1
    Sami4u's Avatar
    Sami4u is offline Butterflies Forever
    Join Date
    Sep 2009
    Location
    USA
    Posts
    1,421
    Thanks
    695
    Thanked 292 Times in 220 Posts

    Unhappy Center a Video on Wordpress

    Hi,

    I need more help I am trying to center a video in the post. Right now it appears all the way to the left side of the post.

    I placed this code in the admin page edit post part. Now when you view the page from the admin. it is centered.

    Code:
    <p style="float: left; width: 75px; height: 247px;">&nbsp;</p>
    However when you view the post from preview changes nothing happens.

    When you publish the post nothing happens. Still on the left side.

    What am I doing wrong?

    Thanks in Advance

    Butterflies Forever

    Sami
    Current Celebrity Gossip Movies & More TV Site
    Find out how I'm able to get up to 420 backlinks for month, by spending 30 seconds per day...all for FREE! - Click Here

  2. #2
    MikeDVB is offline Unknown Net Builder
    Join Date
    May 2009
    Posts
    36
    Thanks
    0
    Thanked 5 Times in 4 Posts
    <p style="float: center; width: 75px; height: 247px;">&nbsp;</p>

    Try that...
    Michael Denney - MDDHosting, LLC - Professional Hosting Solutions
    LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
    Incremental R1Soft CDP Backups on all services! Proudly hosting over 3,800 domains!
    http://www.mddhosting.com/ - New and improved VPS plans!

  3. #3
    Sami4u's Avatar
    Sami4u is offline Butterflies Forever
    Join Date
    Sep 2009
    Location
    USA
    Posts
    1,421
    Thanks
    695
    Thanked 292 Times in 220 Posts
    Quote Originally Posted by MikeDVB View Post
    <p style="float: center; width: 75px; height: 247px;">&nbsp;</p>

    Try that...
    Hi,

    Tried it, NO Go as a matter of fact it deletes the word center when you preview it

    Thanks for trying

    Butterflies Forever

    Sami
    Current Celebrity Gossip Movies & More TV Site
    Find out how I'm able to get up to 420 backlinks for month, by spending 30 seconds per day...all for FREE! - Click Here

  4. #4
    TopDogger's Avatar
    TopDogger is offline Über Hund
    Join Date
    Jan 2009
    Location
    Hellfire, AZ
    Posts
    3,050
    Thanks
    345
    Thanked 909 Times in 694 Posts
    Hi Sami

    There isn't any float: center property in CSS.

    Try this

    Code:
    <div style="display: block; margin-left: auto; margin-right: auto;">
    
    video goes here
    
    </div>
    "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." -- Benjamin Franklin


  5. #5
    Sami4u's Avatar
    Sami4u is offline Butterflies Forever
    Join Date
    Sep 2009
    Location
    USA
    Posts
    1,421
    Thanks
    695
    Thanked 292 Times in 220 Posts
    Quote Originally Posted by TopDogger View Post
    Hi Sami

    There isn't any float: center property in CSS.

    Try this

    Code:
    <div style="display: block; margin-left: auto; margin-right: auto;">
    
    video goes here
    
    </div>
    Hi,

    Nope That didn't work.

    Butterflies Forever

    Sami
    Current Celebrity Gossip Movies & More TV Site
    Find out how I'm able to get up to 420 backlinks for month, by spending 30 seconds per day...all for FREE! - Click Here

  6. #6
    dmi's Avatar
    dmi
    dmi is offline Net Builder
    Join Date
    Mar 2009
    Location
    N43°54′, E017°40′
    Posts
    242
    Thanks
    141
    Thanked 56 Times in 28 Posts
    Code:
    <div align="center">
    video goes here
    </div>

  7. Thanked by:

    Diesel (26 September, 2009), jakki (27 September, 2009), Sami4u (24 September, 2009), Will.Spencer (24 September, 2009)

  8. #7
    Sami4u's Avatar
    Sami4u is offline Butterflies Forever
    Join Date
    Sep 2009
    Location
    USA
    Posts
    1,421
    Thanks
    695
    Thanked 292 Times in 220 Posts
    Quote Originally Posted by dmi View Post
    Code:
    <div align="center">
    video goes here
    </div>

    Hi,

    It works

    That was so simple I have NO idea why I couldn't think of that.

    This might sound dumb but do most basic html codes work in WP?

    Butterflies Forever

    Sami
    Current Celebrity Gossip Movies & More TV Site
    Find out how I'm able to get up to 420 backlinks for month, by spending 30 seconds per day...all for FREE! - Click Here

  9. #8
    dmi's Avatar
    dmi
    dmi is offline Net Builder
    Join Date
    Mar 2009
    Location
    N43°54′, E017°40′
    Posts
    242
    Thanks
    141
    Thanked 56 Times in 28 Posts
    Yes, they do.

  10. Thanked by:

    Sami4u (24 September, 2009)

  11. #9
    TopDogger's Avatar
    TopDogger is offline Über Hund
    Join Date
    Jan 2009
    Location
    Hellfire, AZ
    Posts
    3,050
    Thanks
    345
    Thanked 909 Times in 694 Posts
    Interesting. I wonder why the auto margin method doesn't work with video objects. The code I listed works for images, but I never tried it on a video.

    Sometimes simple is best.
    "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." -- Benjamin Franklin


  12. #10
    MikeDVB is offline Unknown Net Builder
    Join Date
    May 2009
    Posts
    36
    Thanks
    0
    Thanked 5 Times in 4 Posts
    Makes me feel silly, it's been a while since I've messed with HTML/CSS
    Michael Denney - MDDHosting, LLC - Professional Hosting Solutions
    LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
    Incremental R1Soft CDP Backups on all services! Proudly hosting over 3,800 domains!
    http://www.mddhosting.com/ - New and improved VPS plans!

Page 1 of 3 123 LastLast

Similar Threads

  1. Entertainment Center
    By Fenrir in forum General Chat
    Replies: 0
    Last Post: 10 May, 2010, 17:48 PM
  2. Can't Center a Form (PHP/HTML/CSS)
    By vectro in forum Web Design
    Replies: 3
    Last Post: 8 February, 2010, 20:50 PM
  3. Bing Webmaster Center !!
    By WebEvader in forum Search Engine News
    Replies: 6
    Last Post: 9 October, 2009, 23:02 PM
  4. Bing Local Listing Center
    By irahat in forum Promoting
    Replies: 0
    Last Post: 28 August, 2009, 23:39 PM
  5. Replies: 0
    Last Post: 17 January, 2009, 22:34 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •