WordPress: Clear floating image with editor button

When you have a floating image and text, where its height is less then the floated image high, following content will also float around the image.

A solution is to use an element which clears the float before the following content.

For a editor friendly solution I propose the following steps:

  1. There is the ClearBoth plugin which replaces the shortcode „[clearboth]“ with a „br“ element with clearing.
  2. Use Visual Editor Custom Buttons to add a new button to the editor which adds the „[clearboth]“ shortcode into the editor


Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.