The <p>
is the default root element of content in most of WYSIWYG editors (I use tinymce) where <p>
can not contain a block element according to this . When my content is only a single table there is a difference between page source and the rendered elements:
Source of page:
<div class="generalbox">
<p>
<table><tr><td>something</td></tr><table>
</p>
</div>
inspected Element (in both Chrome and Mozila Firefox):
<p></p>
<div class="generalbox">
<table><tr><td>something</td></tr><table>
</div>
<p></p>
This causes a white gap before and after the content. I used the following css rule to omit the gap effect but obviously no success:
.generalbox p:first-of-type {
margin-top:0;
}
.generalbox p:last-of-type {
margin-bottom:0;
}
How should I remove the gap effect? CSS or a server side code or something is WYSIWYG?
' element?
– Ali Sheikhpour Dec 09 '16 at 14:40produces.
– i7nvd Dec 09 '16 at 16:11