I have code below in my Wordpress TinyMce editor:
<section style="box-sizing: border-box;"><section style="display: inline-block; vertical-align: middle; width: 50%; box-sizing: border-box; background: red; height: 30px;"></section><section style="display: inline-block; vertical-align: middle; width: 50%; box-sizing: border-box; background: blue; height: 30px;"></section></section>
Then I have this as outcome: Two element block in a same row
However, when wordpress render this html, it will beautify the Html and turn my raw html to the following:
<section style="box-sizing: border-box;">
<section style="display: inline-block; vertical-align: middle; width: 50%; box-sizing: border-box; background: red; height: 30px;"></section>
<section style="display: inline-block; vertical-align: middle; width: 50%; box-sizing: border-box; background: blue; height: 30px;"></section>
</section>
After hours research. I notice that is because the space between two inline-block. I have tried the "font-size: 0" method and it work perfectly in this simple case.
However, sometimes I need to copy a complicated raw html to my Wordpress site. Adding a "font-size:0" attribute will mess up the entire thing. Thus, I am looking for a solution without touch the html and wondering if any one can tell me how to disable this auto formatting in Wordpress or just disable the "auto new line" at the end of each elements.
Thanks very much :-]