Just out of of curiosity: Which tools did you use to write the book? I know it's especially hard to create different file format (HTML, epub, PDF).
I use Pandoc to generate my EPUB and then Sigil to do a bit of tidying. Usually just the front matter etc.
Some other resources here, the slides from ConFoo are the most up to date http://rachelandrew.co.uk/presentations/css-books