Multiple Stylesheets break anchor links
from @makeBetterEBooks here: https://github.com/dvschultz/99problems/issues/22#issuecomment-47493764
Some more fun and games, in ADE 1.7 if multiple CSS sheets are referenced by the same HTML page, internal hyperlinks will go to the top of that HTML page, NOT the specific anchor.
Never did extensive testing, so unsure if it was the presence of multiple CSS sheets, or the fact that the second one was for mobi.
Hi,
My solutions;

@teytag I don’t think this answers the problem: when multiple stylesheets exist, anchor links are broken. This shows you can load multiple stylesheets, but not that anchor links work.
@dvschultz This error may be momentary. I think this error is not multiply sourced stylesheet. Could you show your codes?
It's actually worse… (and it still lives in BlueFire for instance)
Say you've got an HTML file A with a link to another HTML File B:
- A.html got one stylesheet, ids are used for callback
- B.html got two stylesheets, href points to A.html#id
- when you click B.html to go back to A.html#id, you're back at the top of A.html, not at the id.
So it doesn't only impact one HTML file but 2 when 1 of them got multiple stylesheets.
@JayPanoz Curious how this relates to #22 and the workaround that it has--putting Media Queries in a separate CSS file. So if you do that, your hyperlinks are toast?
Just want to make sure I understand.
I've actually experienced that this morning for an ePub 3 file as I usually put everything “progressive enhancement” is a separate CSS file. So:
- there was a link in the xhtml file with only 1 stylesheet to the file with 2 stylesheets;
- there was a link back in this file with 2 stylesheets, it was heading to an id in the first file;
- tested it back to ADE 1.8 and everything was OK;
- tested it in some apps using RMSDK and the bug applied (e.g. Bluefire Reader iOS, etc.) → instead of heading to the id, it headed to the top of the xhtml file where the id was.
Now, the file with the id got one single stylesheet… only the other one got 2. So it also impacts a file with one stylesheet if the link is in another xhtml file which got 2.
