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

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 08-02-2013, 11:51 AM   #16
Notjohn
Addict
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 218
Karma: 246332
Join Date: Dec 2012
Device: Kindle
Quote:
Originally Posted by Tex2002ans View Post

Code:
div.textbox {
	background-color:#D1D3D4;
	border-bottom: 3px double;
	border-top: 3px double;
	border-left: 3px double;
	border-right: 3px double;
	padding: 1em;
	line-height: 1.7em;
	text-align: center;
}
I think it looks quite good on eink as well. Of course, you could cut out the grey background for your own purposes, and just stick with the nice box.
What does "double" accomplish here, a double line with each line 3 pixels wide?

Thanks for this!
Notjohn is offline   Reply With Quote
Old 08-02-2013, 12:06 PM   #17
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: 14,846
Karma: 5654321
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Notjohn View Post
What does "double" accomplish here, a double line with each line 3 pixels wide?

Thanks for this!
double is one of the possible line styles (there are others )
theducks is offline   Reply With Quote
Old 08-02-2013, 01:25 PM   #18
RbnJrg
Evangelist
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 461
Karma: 318996
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Just now I read your post. I don't know if you've already solved your problem but if you're still looking for a solution, this is mine:

1. In your .css stylesheet, write the following:

Code:
.container {
  display: block;
  margin: 1.5em 0;
  text-indent: 0;
  text-align: center;
}

.formula {
    font-family: serif; /* feel free to change this property */
    font-size: 1.2em; /* feel free to change this size */
    font-weight: normal; /* use bold here if you wish */
    font-style: italic; /* use normal here if you wish */
    padding: 0.25em 0.5em;
    background: #FFFFBF; /* change the color if you wish */
}

.number {
  float: right;
  font-family: serif; /* feel free to change this property */
  font-size: 1.2em; /* feel free to change this size */
  font-weight: bold; /* use normal here if you wish */
  padding: 0 16px 0px 10px;
  margin: 0 0 0 -0.2em;
}

p {
  font-family: sans-serif; /* feel free to change this property */
  font-size: 1em;
  margin: 0;
  text-align: justify;
  text-indent: 0;
}

p + p {
  text-indent: 1em;
}
2. In your .html file, write the following:

Code:
<p>...Some text here ... </p>

<p class="container"><span class="number">(1)</span><span class="formula">C = π r²</span></p>

<p>...Some text here ... </p>
Of course, your formulas will be different

VERY IMPORTANT: The class "number" MUST BE FIRST than class "formula". That is the key in order that the number and the formula are in a same line.

Below you can see a screenshot of my ADE and the respective epub.

Regards
Rubén
Attached Thumbnails
Click image for larger version

Name:	Formula in one line.jpg
Views:	47
Size:	71.2 KB
ID:	108831  
Attached Files
File Type: epub Formula in one line.epub (2.6 KB, 21 views)
RbnJrg is offline   Reply With Quote
Old 08-02-2013, 06:23 PM   #19
Tex2002ans
Fanatic
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 507
Karma: 392101
Join Date: Jul 2012
Device: Nook
Quote:
Originally Posted by Notjohn View Post
What does "double" accomplish here, a double line with each line 3 pixels wide?

Thanks for this!
No problem. The different border types can be found here:

http://www.w3schools.com/cssref/pr_border-style.asp

There is also border-width:

http://www.w3schools.com/cssref/pr_border-width.asp

And here is a nice test where you can test the different types:

http://www.w3schools.com/css/tryit.a...s_border-width



Quote:
Originally Posted by RbnJrg View Post
Just now I read your post. I don't know if you've already solved your problem but if you're still looking for a solution, this is mine:
Thank you! Yes, it was solved by Agama in this topic by placing the floating number to the left of the actual formula, then floating right (just as you have).

I was planning on updating this topic the next time I took a look at that EPUB (I think my employer has it as one of the upcoming projects). I put it on hold to fix this bug, and haven't touched it since.
Tex2002ans is offline   Reply With Quote
Old 08-02-2013, 10:34 PM   #20
eping
ePub Maker
eping began at the beginning.
 
eping's Avatar
 
Posts: 120
Karma: 16
Join Date: Dec 2009
Location: Mordor
Device: iPad,Kindle 3, Nook 2
When will Adobe fix this stupid bug? and many other silly ugly bugs?
eping 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
Question about ADE crutledge ePub 7 04-15-2013 02:11 AM
Kindlet The operator >> is undefined for the argument type(s) float, float twobob Kindle Developer's Corner 10 09-05-2012 12:50 PM
Float bug in ADE ? helenouchkaia ePub 16 01-08-2012 11:11 AM
float not working as expected in ADE iain robinson ePub 8 06-18-2011 04:16 AM
Another question about ADE crutledge Sigil 0 05-21-2010 05:03 PM


All times are GMT -4. The time now is 11:59 PM.


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