Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 10-01-2012, 12:43 PM   #1
Jorge Junior
Member
Jorge Junior began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Sep 2012
Location: Rio de Janeiro - Brasil
Device: Genesis GT-1230
Absolute middle

Hi.

How can I put two sentences right in the middle of the page?
The first line is PART ONE. The second is BIRTH.

<div class="Basic-Text-Frame">
<p class="Basic-Paragraph"<br /></p>
<p class="Basic-Paragraph">PART ONE</p>
<p class="Basic-Paragraph">BIRTH</p>
</div>
Jorge Junior is offline   Reply With Quote
Old 10-01-2012, 01:02 PM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,316
Karma: 4963983
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
You mean centered vertically? That's not possible in a reliable way.
Jellby is offline   Reply With Quote
 
Advertisement
Old 10-01-2012, 01:20 PM   #3
Jorge Junior
Member
Jorge Junior began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Sep 2012
Location: Rio de Janeiro - Brasil
Device: Genesis GT-1230
Quote:
Originally Posted by Jellby View Post
You mean centered vertically?
Yes.
I thought this would work, but it didn't.

<p class="Basic-Paragraph" style="text-align: absmiddle;">
Jorge Junior is offline   Reply With Quote
Old 10-01-2012, 02:39 PM   #4
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 15,270
Karma: 6022733
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Jorge Junior View Post
Yes.
I thought this would work, but it didn't.

<p class="Basic-Paragraph" style="text-align: absmiddle;">
you could get close for all but tiny displays.

Code:
.Basic-Text-Frame {display: block; margin-top: 48%;}
play with the percent value to adjust for the number/font-size of lines contained inside
theducks is offline   Reply With Quote
Old 10-02-2012, 06:50 AM   #5
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,316
Karma: 4963983
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by theducks View Post
Code:
.Basic-Text-Frame {display: block; margin-top: 48%;}
play with the percent value to adjust for the number/font-size of lines contained inside
According to the spec, percent values in vertical margins are calculated with respect to the width of the container (this means that a 10% margin should be exactly the same size, whether it's a vertical or horizontal margin).
Jellby is offline   Reply With Quote
Old 10-02-2012, 09:38 AM   #6
whichgrep
Member
whichgrep began at the beginning.
 
whichgrep's Avatar
 
Posts: 11
Karma: 10
Join Date: May 2012
Location: near Melbourne, Australia
Device: Kobo Touch; Xperia Arc (phone, FBReader); Galaxy Tab 2 7.0 (FBReader)
Can you use a table?

I've only been using Sigil for a week or so; does it support HTML-style tables? (You'll still need the height of the page/table, though, which makes it non-portable).

Code:
table.Basic-Text-Frame {
    text-align:center;
    vertical-align: middle;
    width:100%;
    height:200px;
    border:0px;
}
p.Basic-Paragraph {font-style:normal;}

...
(snip)
...

<table class="Basic-Text-Frame" >
<td>
<p class="Basic-Paragraph">PART ONE</p>
<p class="Basic-Paragraph">BIRTH</p>
</td>
</table>
whichgrep is offline   Reply With Quote
Old 10-02-2012, 10:19 AM   #7
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 15,270
Karma: 6022733
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Jellby View Post
According to the spec, percent values in vertical margins are calculated with respect to the width of the container (this means that a 10% margin should be exactly the same size, whether it's a vertical or horizontal margin).
RMDK 1.7/Sigil seems to behave like I coded (ignores the width part of that rule. Maybe it is because I have set a 0 right and left margin)
theducks is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
50 Shades Of Absolute Crap MorganM General Discussions 102 07-23-2012 02:11 PM
PRS-505 In middle of screen is a triangle with ! in middle toad1960 Sony Reader 0 12-30-2011 02:30 PM
Absolute must-read in the copyright wars Ralph Sir Edward News 105 01-12-2011 08:15 PM
Absolute best eBook reader? Xtt Which one should I buy? 46 04-22-2010 02:48 AM
Whats the absolute BEST accessory you have for your 505? svakanda Sony Reader 61 06-11-2009 12:45 PM


All times are GMT -4. The time now is 10:04 PM.


MobileRead.com is a privately owned, operated and funded community.