I have a lot of inline images in my content. Most of the time I want to have some sentences and an image grouped together. To get a nice layout I have to mannually add class="clearfix" to all <p> tags. This is especially anoying because the class often gets lost when I edit the text in the wysiwyg editor.

Is there an input format, or some other easy way to do that automatically?


If you are trying to add the "clearfix" class to all of your paragraph tags, sitewide, it would probably be more simple to apply the "clearfix" properties to your "p" tag in your CSS files.

So you'd find:

.clearfix { ... }

and add in your paragraph tag like so:

.clearfix, p { ... }

Or copy the properties to your custom CSS file if you are worried about overwriting your changes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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