I like the auto P behavior most of the time, but I don't want it to surround my div tags with paragraphs because I use divs for floating elements and other things. The extra spacing is really a bother since I can just control the spacing manually with styles when using divs.
Any simple fix for this or do I need to hack wordpress.
Note I do not use the WYSIWYG editor
Also note that the div tag in question is the very first thing in the post.
There's a plugin that disables that (annoying) behavior:
http://www.urbangiraffe.com/plugins/disable-wpautop
The problem is that I like the behavior generally because then I don't have to hand code <P> tags for every piece of text. I just wish that it would leave Divs alone. I'm thinking of hacking wpautop myself. It might be easier :(
Perhaps you could use a custom field for the div? You could also generate a class for the field using an additional key. Haven't tried it myself except with images. Seems like you could modify the code found here to check if there is a div before content, then the class would handle the layout.
http://justintadlock.com/archives/2007/10/27/wordpress-custom-fields-adding-images-to-posts
Let us know what you find that works.
So far the only thing that seems to be working is to set the top margin of all P tags to 5px. It requires some adjustment to the rest of my CSS file, but it at least gets rid of the extra space at the top of the page.