Quote:
Originally Posted by u238110
I'm not concerned about device compatibility. ...
|
In that case is perfectly possible. Use the following code:
1. In your .css stylesheet write:
Code:
html, body {
height: 100%;
}
#container {
display: table;
height: 100%;
width: 100%;
border: 5px solid;
}
.row {
display: table-row;
height: 33%;
}
.cell {
display: table-cell;
height: 33%%;
vertical-align: bottom;
text-align: center;
}
2. And in your .xhtml file write:
Code:
<body>
<div id="container">
<div class="row">
<p class="cell">text</p>
</div>
<div class="row">
<p class="cell">text</p>
</div>
<div class="row">
<p class="cell"> </p>
</div>
</div>
</body>
This is how it looks in Sigil:
As you can see, I use a model of three rows and a "vertical-align: bottom". You can bring the text to the center of the screen all you want by changing the height of the rows (for example with the first and third rows with a height of 40% and the middle row with a height of 20% the text will be nearer the center). Of course, take in count that in order to use this code on ADE, you must convert the .epub I attach as epub3 and to use ADE 4 (or higher).
Regards
Rubén