Sometimes, when you add shortcode in post, you will find some incorrect spaces. This is because of wrong WordPress auto formatting. For fixing this problem, just add to function.php
code:
remove_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'wpautop' , 99);
add_filter( 'the_content', 'shortcode_unautop', 100 );
Additionally, you may need to remove empty paragraphs via code
p:empty {display: none;}
you can place this in theme options – general options – custom css