Wordpress has evolved into a complete CMS system and more over the years. But one minor thing that still causes some trouble is the editor that comes bundled with Wordpress installations. While I cannot surely negate the fact that it is a wonderful editor - I have recently come across a small but crucial issue caused by it. It is the use of <br>.
The problem is if you use <br> twice to use it for a hard break it gets converted to <p>. That said, if you have already styled the paragraph tag in your CSS, your hard break will start behaving like one.
It is only with a little tweak that you can solve this problem, as you cannot style br tags directly from the CSS. For this, we need good old jQuery.
Use the following jQuery code inside the header:
$(document).ready(function() {
$('br').replaceWith('<span class="br"></span>');
});
You must be logged in to post a comment.
Kolumny Styropianowe
April 28, 2012
I’ve recently started a website, the info you provide on this site has helped me tremendously. Thank you for all of your time & work.
Listwy Wokółokienne
May 29, 2012
I think this is one of the most significant information for me. And i’m glad reading your article. But want to remark on few general things, The web site style is wonderful, the articles is really excellent : D. Good job, cheers