i am using tiny mce editor to add content to pages, when i hit enter the editor automatically generates
<p> </p> or <p> </p>
i cannot change the settings of tiny mce so that i can change line breaks to be <br> instead of <p> </p> or <p> </p>
in my css i have given the following
.content p{
margin: 0 0 8px 0;
line-height: 18px;
}
so that the content which is within p tags will get the line height and margins between paragraphs that have the content
because of the empty <p> </p> that the editor is generating both the line height and margin bottom are being applied to <p> </p> and there is a big vertical gaps being created
is it possible using jquery to find <p> </p> or <p> </p> so that a new css rule can be set so that these empty p tags will have no line height and very less margin example
$(document).ready(function(){
$("find empty p").css("line-height","0");
$("find empty p").css("margin-bottom","2px");
});
Bookmarks