The line-height css property does not work in a JEditorPane. Can anyone help?
When I place the following html in a JEditorPane, the line-height attr is not obeyed (the font and color ones are though). Does anyone know what I am doing wrong? I checked the html in firefox and it's fine.
<html> <head> <style type="text/css"> p { color:#222222; line-height: 200%; font-family:Tahoma, sans-serif; 开发者_运维问答 } </style> </head> <body> <p>flkdjflssd flsdjf sldfkjsdlf jlsdjfs lfjsldjf sldjfdl fslf sljfs dlfsj fjsd lfsd lfjsdlfj sldfjls df dlfsldf sldfjs ldjflsdjf sldfj sldfjsldfjsldjfsldjfsldjfsldjf sdlfsdlfs dlfs dflsjd flsdjf slfj sdlfjsldfj sdljf sldfjsd lfjsldf sldf sdfs lfjsdfsfkj sdfs dfjdf sldfjsldf sldfsldf sfjsldf sdf </body> </html>
Thanks
Perhaps you can give the xhtmlrenderer a try. I think it should have better support for CSS.
精彩评论