Title: Problems adding object tag in HTML view
Last modified: August 19, 2016

---

# Problems adding object tag in HTML view

 *  [frdk1](https://wordpress.org/support/users/frdk1/)
 * (@frdk1)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/problems-adding-object-tag-in-html-view/)
 * Hi, new to WordPress, have question.
 * I’ve been doing a site for a client, where we are using [**Objecty**](http://wiltgen.net/objecty/)
   to present various forms of video clips. The site uses WP 2.6. The client wants
   to have the vid-clip object centered in the viewport, but the body text that 
   may or may not accompany the clip left aligned. No problem, I’ll just wrap the
   object tag within a div, give it a class to style it center aligned, and Bob’s
   your daddy. Uncle. Whatever.
 * _So I thought anyway._
 * Turns out that if I do this, in the HTML view, add something like the following:
   `
   <div class="centered"><object class="ObjectyMe" uri="clips/clip.type" width="
   blah" height="bleh"></object></div>` Then preview the post and see that it’s 
   not working (no vid is visible), so you backtrack to the post and see that it’s
   no wonder the vid isn’t playing – your nice code has been _transformed into the
   standard object code_ for whatever file format the clip is. The ObjectyMe class(
   which is required for the Objecty script to recognize and process the object 
   contents) is gone.
 * I get it, there’s probably some strip tag function at work, but where..?
 * I’ve temporarily worked around the problem by instructing the client to just 
   add the object tag in all its Objecty glory, without wrapping it in a div or 
   other container. This obviously places it in a text paragraph and text for the
   main container is left aligned… Bugger.
 * Loooong story short: **what must I do to be able to wrap the object in a div?**
   All suggestions are welcome. Truly useful suggestions are loved. Might even get
   a cookie.
 * Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [iridiax](https://wordpress.org/support/users/iridiax/)
 * (@iridiax)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/problems-adding-object-tag-in-html-view/#post-849025)
 * You could try styling **object class=”ObjectyMe”** in your style.css so that 
   no added code is needed in the post.
 *  Thread Starter [frdk1](https://wordpress.org/support/users/frdk1/)
 * (@frdk1)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/problems-adding-object-tag-in-html-view/#post-849057)
 * Thanks for responding, iridiax. It was the first thing I tried, but the thing
   is this: when entered “naked”, the object tag is wrapped in `<p>` tags, so any
   styling of the object tag or the ObjectyMe class gets overridden by the parent
   container’s paragraph styling. Stuff like auto margins or other centering tricks
   simply don’t stick.
    The other problem is that in the default state, when wrapping
   the object tag in a div, _the manually entered code gets altered_. I can understand
   that it’s a security measure, to prevent malicious code to be entered, but it
   also causes problems. I’m trying a few workarounds, but… Other suggestions?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Problems adding object tag in HTML view’ is closed to new replies.

## Tags

 * [div](https://wordpress.org/support/topic-tag/div/)
 * [html](https://wordpress.org/support/topic-tag/html/)
 * [object](https://wordpress.org/support/topic-tag/object/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [frdk1](https://wordpress.org/support/users/frdk1/)
 * Last activity: [17 years, 8 months ago](https://wordpress.org/support/topic/problems-adding-object-tag-in-html-view/#post-849057)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
