Skip to content

Instantly share code, notes, and snippets.

View Cuadratin's full-sized avatar

Emiliano Molina Cuadratin

View GitHub Profile
@elmimmo
elmimmo / center-images.xhtml
Last active January 31, 2025 19:02
Center images in ebooks
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8"/>
<title>Centering images in ebooks</title>
<!-- <link rel="stylesheet" type="text/css" href="style.css"/> -->
<style type="text/css">
.center-image {
@NickBarreto
NickBarreto / iBooks popups which degrade nicely in other devices
Last active September 3, 2024 10:37
How to create popup footnotes in iBooks which degrade well for other EPUB3 readers
The only requirements for popup footnotes in iBooks are:
* Ebook has to be an EPUB3
* epub:type "noteref" and "footnote"
So you can link to a totally separate document, as you normally would for endnotes,
but include the attributes so the <a> link behaves differently in iBooks, instead triggering the popup.
Original reference link would look something like this (in a file called ch001.html):
<a epub:type="noteref" href="footnote.html#note1">1</a></div>
@rdeltour
rdeltour / dabblet.css
Created November 14, 2012 15:08
EPUB 3 DICT Sample
/* EPUB 3 DICT Sample */
@import url(http://meyerweb.com/eric/tools/css/reset/reset.css);
/* Layout */
article {
margin:0.5em;
margin-bottom: 2em;
}