Every once in a while, I see a passing reference to how impossible it is to center something vertically using CSS. But vertical centering isn't difficult, not anymore. Here are some methods for vertical centering using only CSS (even on elements of unknown height) which are completely feasible for most sites.
Flexbox makes it dead simple to vertically center an element. Assuming you've got a height (even in
rems), just throw
display: flex; on the outer element, and
margin: auto; on the inner element. This uses the flexbox mode, which is pretty well supported as of IE11, Firefox 33, Chrome 11, iOS Safari 7.1, and Android Browser 4.4.
The 2D transforms offer wider browser support (adding IE9, IE10 and Android Browser 4.1+) and a slightly more complex implementation. Put any height and
position: relative; on the outer element, and these specifications on the inner element. This still works when the inner element is using an unspecified (or
auto) height. Example:
transform: translate(-50%, -50%);
In case you need even more options or details on these solutions, I've detailed more methods here on Codepen.
I had been doing a lot of ebook reading on my iPad, but sometimes the experience was lacking due to the ereader application that I was using to read the book. Since then I put a variety of ereaders through their paces with various file types, and what follows is a summary of my findings.
I only evaluated iPad ereaders. My primary use for ereaders is for technical books, with fiction novels being a less common use case. As such these were the features I cared about:
- Easy to use & jank-free reading experience
- Nighttime reading mode with a dark background and light text
- Able to import ebooks from Dropbox. (Most of my ebooks are available in .epub, .mobi and .pdf formats. A few ebooks are only available in .pdf. A very few are also available in .daisy or, more rarely, .apk formats.)
- Displays code samples reasonably
- Dictionary look-up
- Font size changing
- Opens URLs
These were the applications I considered:
- Marvin - a relative newcomer to the ereader scene - is well worth the $4 price on the App Store. It's jank free, has ebook searching abilities, and looks and behaves beautifully. It's also got Dropbox integration which saves me from having to suss long titles out of the Dropbox app. Nighttime reading mode was a bit tricky to find in the UI; I expected it to be in the brightness settings, but it was actually in the font settings under "Themes". It only reads .epub files, but it excels at doing so.
- For .pdfs, iBooks is the best option. Nook can't tell the the difference between a highlighting and a page-turn gesture. Reader doesn't have highlighting, dictionary look-up or even bookmarking functionality.
- Kindle is the only one capable of reading .mobi files. It does a pretty good job at doing so, but the highlighting functionality is a bit wonky.
- Each app which also sells stuff (Kindle, Nook, Play Books, iBooks) is good for reading the stuff it sells. Often you can score free ebooks this way.
- Play Books can open both .pdf and .epub files, but you have to upload them to Google, which then does some kind of conversion on them. When reading a .pdf, the text rendering was fuzzy, and then the app crashed. When reading an .epub, there wasn't any highlighting or note-taking functionality.
- Nothing reads .daisy files.
I went to a constructed deck tournament for Dice Masters this weekend. I had fun, but didn't expect to lose so much. Here is a review of the cards I brought, and how effective they were in play.
- Ant-Man - Biophysicist (UXM): It's always great to have a 2 energy cost character for the first few rounds, but I think a Beast or Storm might be better in a Constructed format where players have control of the dice distribution.
- Storm - African Priestess (AVX): Very effective. I'd like to load this card up with the maximum of 4 dice next time.
- Kitty Pryde - Sprite (UXM): Kitty wasn't as effective as I needed at a cost of 3 energy. Perhaps I'll try her 2 cost card next time.
- Nightcrawler - Circus Freak (AVX): I didn't buy any Nightcrawlers during the matches, because every time I had 4 fist energy, I wanted a Wolvie. I want to play with Kurt, so I will just have to suck it up and try him next time.
- Wolverine - Formerly Weapon Ten (AVX): This Wolvie works great - especially if you can clear all the blockers. Thrown Car's spillover damage helps.
- Black Panther - Wakanda Chief (UXM): He would have worked well (Thrown Car counters his "opponents must have fielded characters" limitation), but as another 4 fist energy character, I didn't get him out enough.
- Captain America - Star Spangled Avenger (AVX): This was a very effective card, but difficult to buy since I didn't have any lower-cost Shield type characters.
- Cable - Techno-Organic (UXM): As with Cap, Cable would have been effective at clearing small blockers, but was too tricky to buy.
- Thrown Car (AVX): One of the more expensive actions, especially with Wolverine and Black Panther available, but this action always leads to damage.
- Focus Power (AVX): A cheaper action that's almost always useful.