Quote:
Originally Posted by Slevin#7
Can you please tell me, where the code is wrong? It passes the epub check and works well in Sigil, Calibre and other readers.
Regarding the px to hide the checkbox, it doesn't matter which size the screen has, it's just a big value to place the checkbox way out of the viewport. Values of -100/-100 should work as well, as long as there is no relative parent along the way up to the body element.
|
Code:
.toggle-answer {
cursor: pointer;
/* prevent accidentally selecting */
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/* hide the checkbox, not a must for functionality */
.checkbox-answer {
position: absolute;
top: -1000px;
left: -6000px;
width: 0;
height: 0;
opacity: 0;
}
for toggle-answer, none of code being used is ePub compatible. For checkbox-answer, your px values are way too large.