nanopop
nanopop copied to clipboard
Alignment when body height is not 100%
This isn't a bug as such, but it did catch me by surprise, so I thought I'd document it and you can decide if it is a bug or not.
The alignment offered by nanopop fails (return null
) when the height of the window is large enough for the content to align correctly, but the body
is not (i.e. it might have a small amount of content, or a position fixed element which is what I was using).
Here is a screenshot showing the body being short:
Edit: Bother, the firefox highlighting of the element didn't get included in the screenshot. The body tag height ends just after the little CloudTables logo.
Perhaps when the container is the body, it should use the window height / width rather than the body? I worked around it in my case with a min height of 100% for the body.