NightWhistler / HtmlSpanner

Android HTML rendering library with CSS support
http://nightwhistler.github.io/HtmlSpanner/
868 stars 209 forks source link

Nested CSS Rules are not applying. #47

Open Legendcode-amit opened 8 years ago

Legendcode-amit commented 8 years ago

Problem facing in rendering epub file.

CSSLinkhandler not received css rules of the tag <p> class in the <a> tag, like font, test_decoration etc. <div class="abc"> <p class="cont_ct"><a href="05_preface.xhtml">Preface</a></p> <p class="cont_ct"><a href="part1.html" >Part 1</a></p> <p class="cont_ct"><a href="part2.html" >Part 2</a></p> <p class="cont_ct"><a href="part3.html" >Part 3</a></p> <p class="cont_ct"><a href="part4.html" >Part 4</a></p>

</div>

Iam also use html like this, but no positive response are there. <div class="abc"> <a href="05_preface.xhtml" class="cont_ct">Preface</a> <a href="part1.html" class="cont_ct">Part 1</a> <a href="part2.html" class="cont_ct">Part 2</a> <a href="part3.html" class="cont_ct">Part 3</a> <a href="part4.html" class="cont_ct">Part 4</a> </div>

if we put spanner.registerHandler("link", new CSSLinkHandler(this)); then link active without css and when put spanner.registerHandler("a", new CSSLinkHandler(this)); then css work fine but link is not working.

Please give me solution.

monowar1993 commented 7 years ago

Hello @Amitebc , I need a help. I need to know how to use the CSS tags to display text in android textview. Cause I am not finding any documents regarding this. It will be a great help for me.