I've been using the WP html editor (I have the "use visual editor" checkbox unchecked in my users options) and it has been inserting unnecessary closing p elements directly before my correct closing div tags. My code won't validate because of this.
I read a few posts and tried deleting this: p/-div[*], from this line:
$valid_elements =
‘p/-div[*],-strong/-b[*],-em/-i[*],-font[*],-ul[*],-ol[*],-li[*],*[*]’;
in the wp-includes/js/tinymce/tiny_mce_config.php file.
It's still adding the unnecessary closing p element.
Not sure what to do next. Has anyone experienced this?