WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to clear floats in WYSIWYG editor? Not everyone know how to add <div style="clear:both>" in HTML mode. Is there any way to add extra button to WYSIWYG or plugin. TineMCE doesn't have that option.

share|improve this question
up vote 1 down vote accepted

Write a simple shortcode to add a <div style="clear: both;">&nbsp;</div>

Detailed Explanation: http://brettterpstra.com/adding-a-tinymce-button/

share|improve this answer
shortcode is great idea, but couldn't add custom button following that tutorial, maybe WP 3.1 has changed the way buttons are added. Thank for pointing me in this direction!!! – alexndm Apr 23 '11 at 17:43
This doesn't work? I copy/pasted it into a gist. Download and give it a try as plugin: gist.github.com/938844#comments – kaiser Apr 23 '11 at 18:19
Setting "overflow: auto" in CSS is a much better way of clearing floats than adding extra markup -- blogs.sitepoint.com/simple-clearing-of-floats – Ian Dunn May 23 '11 at 22:39

Your Answer


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.