Join Tony Harmer for an in-depth discussion in this video Quick references, part of CSS for EPUB.
- View Offline
- [Voiceover] I use two different pieces of software to work on EPUBS, and really it just depends on what I'm doing and to some extent, what mood I'm in. The first of these is Sigil, and Sigil makes it really easy to open an EPUB. You simply click on this button here or you use the file menu. Choose your EPUB and then open it. Once it's open you can switch between book view, the view I'm in currently or code view, just by clicking like so. One of the nice things about Sigil is that you can actually make your edits in book view.
It has a web inspector so you can right-click on it and choose to inspect an element, and you'll get all the different little bits of information that you'll need about how that's rendered in the book just there, and you can of course work with all of the different files on the left-hand side and add things into the file really easily. So if you needed to add some images you can just drop them directly into this directory. In Calibre, which is the tool I'll be using for this particular course, Calibre is all sorts of things at the same time.
So it's a library for all of your ebooks. You can add books simply by clicking here and then from single or multiple directories like so. And you can also view them using the viewer application, so you just right click and choose view or even tap V to do that opens in a separate viewer application. You can edit the book by right-clicking and using the edit module just here. And so that opens up as a separate application, it also has an inspector which I've got open so I'll close that for a second.
Just right-click and choose inspect element. It has a built in validator as well which is kind of useful as well. There's an error in there that needs fixing that's funny. So, it has that, and it also has ways to open and add files from the left-hand side, and a way to pretty up your files as well. You can get both of them from their respected websites. A simple search in your search engine should yield your result pretty quickly. Sigil is now on GitHub, and Calibre has its own website.
NOTE: The techniques shown are designed to help members create reflowable EPUBs with CSS 2.1. There is some CSS3 for creating fixed-layout EPUBs covered, but the majority of the tutorials concentrate on CSS 2.1.
- Working with CSS selectors
- Incorporating @ directives in CSS
- Understanding the CSS box model
- Writing more efficient code with shorthand notation
- Sizing and positioning text
- Including images with CSS
- Styling lists
- Assigning relative, absolute, and fixed positions
- Floating elements