Title: Embed (YouTube) problem with formatting code
Last modified: August 18, 2016

---

# Embed (YouTube) problem with formatting code

 *  [rudeseal](https://wordpress.org/support/users/rudeseal/)
 * (@rudeseal)
 * [19 years, 1 month ago](https://wordpress.org/support/topic/embed-youtube-problem-with-formatting-code/)
 * This is a wierd problem.. Before I start, let me say that I have WYSIWYG turned
   off, along with the XML stuff is turned off. I am working with the Code window
   only. And also I do not need replies where someone suggests a plug-in, this is
   a new problem (Bug) within version 2.1 of WordPress, whereas this problem was
   not seen in earlier versions of WordPress..
 * Ok, I am trying to embed a YouTube video and I am using `<p align="center">` 
   to center it up in a posting. I had no problem with the following code using 
   2.0x version of WP. But now that I have updated to 2.1 I am seeing this problem.
   Basically if you post the code below, you will see what looks like a missing 
   graphic with a bitty little “x” where the youtube video should be.
 * `<P align="center"> <object width="425"` `height="350">`
    `<param name="movie"``
   value="http://www.youtube.com/v/ZByndN_ffyw">` `</param><param name="wmode"` `
   value="transparent"></param>` `<embed src="http://www.youtube.com/v/ZByndN_ffyw"``
   type="application/x-shockwave-flash"` `wmode="transparent" width="425"` `height
   ="350"></embed></object> </P>`
 *  If you remove the `<p align="center">` and the `
    ` from the post the video 
   will be seen on the post albiet not centered. If you also move the paragraph 
   stuff to a seperate line as so:
 * `<P align="center">`
 * `<object width="425" height="350">`
    `<param name="movie"` `value="http://www.
   youtube.com/v/ZByndN_ffyw">` `</param><param name="wmode"` `value="transparent"
   ></param>` `<embed src="http://www.youtube.com/v/ZByndN_ffyw"` `type="application/
   x-shockwave-flash"` `wmode="transparent" width="425"` `height="350"></embed></
   object>`
 * `</P>`
 * The Video will be seen. But the problem with this is that the video will not 
   center. I have also tried using the paragraph format without the `align="center"`
   with the same results where the video only shows up as a “Broken” graphic symbol.

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/topic/embed-youtube-problem-with-formatting-code/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/embed-youtube-problem-with-formatting-code/page/2/?output_format=md)

 *  [drmike](https://wordpress.org/support/users/drmike/)
 * (@drmike)
 * [19 years, 1 month ago](https://wordpress.org/support/topic/embed-youtube-problem-with-formatting-code/#post-524829)
 * Try using div instead.
 * `<div align="center">code</div>`
 *  Thread Starter [rudeseal](https://wordpress.org/support/users/rudeseal/)
 * (@rudeseal)
 * [19 years ago](https://wordpress.org/support/topic/embed-youtube-problem-with-formatting-code/#post-524917)
 * the `<DIV>` code is mapped for a different style in the template style sheet,
   so using it in this instance is not an option.. the problem is in the code for
   WP itself..
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [19 years ago](https://wordpress.org/support/topic/embed-youtube-problem-with-formatting-code/#post-524918)
 * dont do it that way. do it this way:
 * `<object class="SOMECLASS" type="application/x-shockwave-flash" style="width:
   425px; height:350px;" data="http://www.youtube.com/v/72zn2KODSsY"><param name
   ="movie" value="http://www.youtube.com/v/72zn2KODSsY" /></object>`
 * where someclass is what centers it, like so:
 *     ```
       .SOMECLASS {
       	display:block;
               margin:auto;
       so on and so on ...
       }
       ```
   
 * Please note too that what you are using is not going to produce valid markup.
   My example will.
 *  [Navie](https://wordpress.org/support/users/navie/)
 * (@navie)
 * [19 years ago](https://wordpress.org/support/topic/embed-youtube-problem-with-formatting-code/#post-524928)
 * My problem is somewhat the same, except that there’s no ‘center’ in the beginning
   of the youtube code, only ‘object’.
 * First everything withe the embedding was fine, then I experimented with changing
   to different themes, then the video stopped showing with only an ‘X’ visible 
   top left.
 * Strangely, the video is visible on firefox.
 * [http://www.polaris-snow.com/](http://www.polaris-snow.com/)
 * I tried deleting temp files and such but the vids are still not visible on explorer.
 * Another thing, is there a simple way to edit the width of the posting area? It
   seems too cramped. Better yet, can anyone direct me to the best online resource
   for editing the wordpress template? Thank you.
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [19 years ago](https://wordpress.org/support/topic/embed-youtube-problem-with-formatting-code/#post-524929)
 * Navie,
 * I give a working example of how to embed youtube videos that will display in 
   Firefox and IE above, and in innumerable other threads that ask similar questions.
 * > ..Better yet, can anyone direct me to the best online resource for editing 
   the wordpress template?
 * Plain as day: [http://codex.wordpress.org/Theme_Development](http://codex.wordpress.org/Theme_Development)
 *  [Navie](https://wordpress.org/support/users/navie/)
 * (@navie)
 * [19 years ago](https://wordpress.org/support/topic/embed-youtube-problem-with-formatting-code/#post-524932)
 * Whooami, can you give me a working example with the video here? I really don’t
   know where to insert the SOMECLASS code as I’m not really technical oriented 
   at all.
 * <object width=”425″ height=”350″><param name=”movie” value=”[http://www.youtube.com/v/jCIp7eo4MvY”></param><param](http://www.youtube.com/v/jCIp7eo4MvY”></param><param)
   name=”wmode” value=”transparent”></param><embed src=”[http://www.youtube.com/v/jCIp7eo4MvY&#8221](http://www.youtube.com/v/jCIp7eo4MvY&#8221);
   type=”application/x-shockwave-flash” wmode=”transparent” width=”425″ height=”
   350″></embed></object>
 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [19 years ago](https://wordpress.org/support/topic/embed-youtube-problem-with-formatting-code/#post-524933)
 * I’m not Whooami but,
 * `<object class="SOMECLASS" width="425" height="350"><param name="movie" value
   ="http://www.youtube.com/v/jCIp7eo4MvY"></param><param name="wmode" value="transparent"
   ></param><embed src="http://www.youtube.com/v/jCIp7eo4MvY" type="application/
   x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object
   >`
 * SOMECLASS can be any name. Don’t forget the stylesheet as she pointed out above.
 *  [Navie](https://wordpress.org/support/users/navie/)
 * (@navie)
 * [19 years ago](https://wordpress.org/support/topic/embed-youtube-problem-with-formatting-code/#post-524934)
 * I’ve no idea what stylesheet is, but that is another topic. Right now, I’ve pasted
   the exact code you gave me, samboll and the video still doesn’t show on IE but
   still shows fine on firefox.
 * So I thought IE and youtube is having problems, but then I went to youtube.com
   on IE, and the videos there displayed okay.
 * This problem only emerged after I tried switching themes in the Presentation 
   tab last night, the videos were displaying fine before.
 * Even after switching back to the original orange theme, the prob persists, so
   I guess it’s not a theme-caused thing.. now I’m using the blue “it could be this
   one” theme.
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [19 years ago](https://wordpress.org/support/topic/embed-youtube-problem-with-formatting-code/#post-524935)
 * and again, the code I posted AND the code sam reposted works flawlessly in IE
   and FF.
 * your issue might be related to your IE browser. Go download and install the latest
   version of flash — you tube requires 9.whateverislatest. If you dont have it,
   IE will see black, its as simple as that.
 * You are more than welcome to follow the link in MY profile and look around my
   site. I use flash extensively — and it ALL works in IE and FF.
 * I also post you tube videos.
 * If you dont know a stylesheet is, honest to god, what have you been doing for
   the 4 months youve been on this forum?
 * How bout we do a little educating. Google is waiting for you.
 *  [Navie](https://wordpress.org/support/users/navie/)
 * (@navie)
 * [19 years ago](https://wordpress.org/support/topic/embed-youtube-problem-with-formatting-code/#post-524936)
 * Can you see my youtube videos there at all?
 * I saw my flash version is 9.xx on Adobe’s site but just to be sure I went to 
   download.com to get the latest one and reinstalled, rebooted but still can’t 
   see the youtube videos.
 * I’m at the point where I think the only way to solve this right now is to delete
   this wordpress and mysql, then ftp and start a mysql from scratch.
 * Is there any other solution?
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [19 years ago](https://wordpress.org/support/topic/embed-youtube-problem-with-formatting-code/#post-524937)
 * I see them, and they play just FINE in my ie.. its your browser, its not wordpress,
   its certainly NOT mysql (why do think mysql would have anything to do with playing
   youtbe videos anyway??)
 *  [Navie](https://wordpress.org/support/users/navie/)
 * (@navie)
 * [19 years ago](https://wordpress.org/support/topic/embed-youtube-problem-with-formatting-code/#post-524938)
 * (As I said I’m not a technical at all and mysql was one of the steps needed after
   uploading the wordpress in ftp, so any reinstall will probably mean I needed 
   to delete and redo _everything_ from scratch.)
 * Finally managed to solve it, from this other thread.. [http://wordpress.org/support/topic/109127?replies=8](http://wordpress.org/support/topic/109127?replies=8)[
   resolved] WordPress, YouTube and Internet Explorer
 * What it involves is,
 * <div style=”text-align: center”>YOUTUBE-CODE-IN-HERE</div>
 * (Aaaaaaaaaarrggghh!!!!)
 * Does anyone here recommend the plugin at the bottom of that thread to simplify
   inserting embedded video?
 * [http://www.viper007bond.com/wordpress-plugins/vipers-video-quicktags/](http://www.viper007bond.com/wordpress-plugins/vipers-video-quicktags/)
 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [19 years ago](https://wordpress.org/support/topic/embed-youtube-problem-with-formatting-code/#post-524939)
 * Viper’s plugin is the only one I use for inserting any video.
 *  [webranger1962](https://wordpress.org/support/users/webranger1962/)
 * (@webranger1962)
 * [19 years ago](https://wordpress.org/support/topic/embed-youtube-problem-with-formatting-code/#post-524942)
 * I’ve played with this a lot. The problem somehow appears to be the rich editor.
   If you turn it off, it works fine. Thanks for the hint about wmode….
 * Let me paint a little scenario and I think you might get to the bug.
 * If I turn off the rich text widget, then I can pop the YouTube flash snippet 
   into a post…. no problem.
 * If I turn the rich text widget back on and then edit the post it screws the post
   up.
 * What it does (even if you open the source window and fix it) is turn all the 
   <embed> into <ibed> and </ibed>.
 * Something is screwy with the RTE because if you open a file that worked with 
   a YouTube video and save it again without editing, it will be screwed up.
 * My brother reports the same problem on his blog. Just for the sake of convenience
   it would be nice to just cut and paste.
 * 🙂
 * Kevin
 * retrovision.tv
 *  [guibuu](https://wordpress.org/support/users/guibuu/)
 * (@guibuu)
 * [19 years ago](https://wordpress.org/support/topic/embed-youtube-problem-with-formatting-code/#post-524955)
 * whooami code work for me. Anyway, for copy-paste YouTube videos into WordPress**
   without adding any more** (such `class="SOMECLASS"`), I have added to my stylesheet(
   stylesheet = .css 😉 not a class definition, but an **object** definition:
 *     ```
       object {
       	display: block;
       	margin: auto;
       	}
       ```
   
 * In short: with this, all YouTube videos* are centered without any extra code.
   *
   I mean, any `<object>`.

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/topic/embed-youtube-problem-with-formatting-code/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/embed-youtube-problem-with-formatting-code/page/2/?output_format=md)

The topic ‘Embed (YouTube) problem with formatting code’ is closed to new replies.

## Tags

 * [embed](https://wordpress.org/support/topic-tag/embed/)
 * [format](https://wordpress.org/support/topic-tag/format/)
 * [formatting](https://wordpress.org/support/topic-tag/formatting/)
 * [paragraph](https://wordpress.org/support/topic-tag/paragraph/)
 * [Youtube](https://wordpress.org/support/topic-tag/youtube/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 22 replies
 * 12 participants
 * Last reply from: [somethingdigital](https://wordpress.org/support/users/somethingdigital/)
 * Last activity: [18 years, 4 months ago](https://wordpress.org/support/topic/embed-youtube-problem-with-formatting-code/page/2/#post-525031)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
