![]() |
#1 |
Connoisseur
![]() Posts: 53
Karma: 10
Join Date: Feb 2015
Device: Sony PRS-T1
|
anchor ids with display:none not works correctly
Hi,
When i have a long site with anchor ids, the links don't works correctly in book view. No problem in code view. Is this a bug in Qt (render problem), in Sigil, or PEBCAK? I attached a test case. Thanks. |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,684
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
This behavior is caused by the style that you've assigned to the link targets:
Code:
<h2 class="hide" id="sigil_toc_id_13">Absenz</h2> Code:
.hide {display:none;} You might want to change this to: from: Code:
<h2 class="hide" id="sigil_toc_id_13">Absenz</h2>
<p><strong>Absenz</strong> · Abwesenheit · Defizit · Fehlen</p>
Code:
<p id="sigil_toc_id_13"><strong>Absenz</strong> · Abwesenheit · Defizit · Fehlen</p>
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Connoisseur
![]() Posts: 53
Karma: 10
Join Date: Feb 2015
Device: Sony PRS-T1
|
Yes, but without <h>, i cannot creating a toc?
|
![]() |
![]() |
![]() |
#4 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 860
Karma: 4097942
Join Date: Jun 2012
Location: London, UK
Device: Sony PRS-505, Pocketbook TL3, TL4, TL5
|
The following should work
<h2 class="hide" title="Absenz" id="sigil_toc_id_13"></h2> This is what you have done in the file cover.xhtml in your attachment. |
![]() |
![]() |
![]() |
#5 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,684
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
You could do the following:
1. Generate the TOC to have Sigil insert ids. 2. Select the Regular Expression mode and use the following regular expressions to copy ids to the paragraph tags (and to delete the headings): Find:<h2 class="hide" id="(.*)">.*?</h2>\s*<p> Replace:<p id="\1"> Once you've done that the link targets should also work in Book View mode. (At least it worked for the sample that you provided.) |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Connoisseur
![]() Posts: 53
Karma: 10
Join Date: Feb 2015
Device: Sony PRS-T1
|
Thanks for your support.
I think, MickiTee’s version is better for me. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Epub does not display images correctly | Amalthia | Calibre | 3 | 09-05-2011 06:44 AM |
Another ePub does not display correctly. | KjellM | EPUBReader | 7 | 07-16-2010 03:31 AM |
How to get author/title to display correctly on Jetbook? | Canuck_in_Japan | Ectaco jetBook | 2 | 06-09-2010 08:24 PM |
Any ereader device display Thai correctly? | bthoven | Which one should I buy? | 19 | 10-07-2009 02:00 AM |
Getting Mobipocket authors to display correctly on Kindle | geoelectric | Amazon Kindle | 31 | 02-14-2008 02:22 AM |