View Single Post
Old 01-29-2015, 02:56 AM   #22
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by Jellby View Post
And as long as the renderer interprets it that way.
There's no other valid way to interpret it. The CSS spec is pretty explicit about what 100% means. It means 100% of the enclosing container's size, and 100% on the outermost tag (HTML) means fill the entire viewport. The only problems you might run into involve padding and margins (because it is 100% of the total box size, not the interior dimensions of the box).

In theory (I haven't tried this), you could also set the position to absolute and set left, right, top, and bottom to 0, and you should get the same results. Or you could set width and height to auto instead of 100%. Just as long as you do it on all elements (including html), it should work, but again, I haven't tried it.


Quote:
Originally Posted by Toxaris View Post
Some readers will actually give issues if you use height: 100%.
Really? Experimentally, it works fine for me in ADE, RMSDK (e.g. Nook), iBooks, Kindle, and other WebKit-based readers. That should cover everything but a handful of obscure third-party reader apps (and experimentally, it works on nearly all of those, at least on iOS, and I filed bugs against the one that misbehaved with zero-length margins/padding, and I'm pretty sure they fixed it).

What readers did you have problems with height: 100% in, and under what circumstances?
dgatwood is offline   Reply With Quote