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

Thread: Center a Video on Wordpress

  1. #1

    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
    <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
    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
    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
    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
    Join Date
    Mar 2009
    Location
    N43°54′, E017°40′
    Posts
    242
    Code:
    <div align="center">
    video goes here
    </div>

  7. #7
    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

  8. #8
    Join Date
    Mar 2009
    Location
    N43°54′, E017°40′
    Posts
    242
    Yes, they do.

  9. #9
    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


  10. #10
    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, 21: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, 23: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
  •