View Single Post
Old 03-20-2010, 01:22 PM   #14
Ankh
Guru
Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.
 
Ankh's Avatar
 
Posts: 714
Karma: 2003751
Join Date: Oct 2008
Location: Ottawa, ON
Device: Kobo Glo HD
This is ugly as hell, but works on Sony 505 and ADE/Windows 1.7.2. No SVG, so it should (does it?) work on every ePub reader.

Code:
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>ePub Vertical Centering - Test Page</title>
		<style type="text/css">
			html, body   {height:100%; margin:0; padding:0;}
			.wedge 
				{float:left; height:50%; margin-bottom:-2em;}
			.container 
				{clear:both; height:4em; position:relative;}
			table, tr, th {height:4em;width:100%;text-align:center;}
		</style>
	</head>
	<body>
		<div class="wedge" />
		<div class="container">
			<table><tr><td>
				<p>Bull's eye!</p>
			</td></tr></table>
		</div>
	</body>
</html>

Last edited by Ankh; 03-20-2010 at 01:32 PM.
Ankh is offline   Reply With Quote