Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm trying to right align (class="alignright") a YouTube video AND allow my client to edit the surrounding text in the future using the visual editor. I simply added class="alignright" to the tag containing the embed using the HTML editor however when any changes are made to the text using the visual editor WordPress strips the extra code. I think it might be impossible to get the result that I want but could anyone confirm my suspicions or give me a workaround.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Use an id and CSS selector for the element and align it in your stylesheet.

share|improve this answer
    
Do you mean that WordPress will not strip an id the way it strips the class ? –  byronyasgur Oct 4 '11 at 21:43
    
No, I mean do it from outside of the post via external style sheet, so you don't have to worry about the stripping of code. So target the object for that post id. –  Drai Oct 4 '11 at 21:52
    
oh the POST id ! - thanks - good idea –  byronyasgur Oct 4 '11 at 22:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.