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.

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
add comment

1 Answer

up vote 0 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
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.