Thanks a lot. Turning off the automatic paragraph tag was a solution good enough for this one.
I got almost the same problem here. In CSS I have added border, and background color to the p tags, and got another style for the img. But when I post an img, it gets the borders and background from the p and from its own style. So it would be nice if there would be a way to turn off WP’s HTML formatting style, and make it encode p tags in the post only if I write so. Any idea how to skip this problem?