Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how prevent Textpane from inserting <p style="margin-top: 0"> when hit CR

843806Dec 20 2007 — edited Dec 21 2007
HI all, when using a JTextPane with a content type of text/html, hitting carriage return inserts

<p style="margin-top: 0" >

</p>

I would much prefer

<p>

</p>

I have inserted a style at the top of my document indicating

<style type=="text/css=">
p { margin-bottom: 0.0; margin-top: 0.0 }
</style>

so don't need the redundant margin-top:0 everytime I hit ENTER
in my p tags

can someone point me in the right direction
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 18 2008
Added on Dec 20 2007
5 comments
317 views