Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 11-23-2015, 07:56 AM   #16
JLius
Village idiot
JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.
 
JLius's Avatar
 
Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
Of course, thank you!
JLius is offline   Reply With Quote
Old 11-23-2015, 06:13 PM   #17
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,303
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by JLius View Post
Okay, so I'm even more of an idiot than I thought I was...
Anyway, I have this:
Code:
p {
  text-indent: 0;
  line-height: normal;
  margin-bottom: 1em;
}
and this:
Code:
.nomargin {
  margin-bottom: 0em;
}
But when I write this:
Code:
<p class="nomargin">Blablabla</p>
<p class="nomargin">Blablabla</p>
<p>Blablabla</p>
There's still a margin-bottom between these three paragraphs. The "nomargin" class ain't doing shit.
What am I missing here?
For the sake of concise coding, you should have the normal style as the paragraph style used on the majority of paragraphs...save the specific class for the different paragraph.

Code:
p {margin:0; text-indent:1.2em}
p.break {margin-top:1em; text-indent:0}

<p>normal paragraph</p>
<p>normal paragraph</p>
<p.break>no indent with a space above it paragraph</p>
<p>normal paragraph</p>
<p>normal paragraph</p>
Turtle91 is offline   Reply With Quote
Old 11-24-2015, 03:08 AM   #18
JLius
Village idiot
JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.
 
JLius's Avatar
 
Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
I tried your suggestion. The most common paragraphs have a margin:

Code:
p {
  text-indent: 0;
  line-height: normal;
  margin-bottom: 1em;
}
Code:
p.nomargin {
  margin-bottom: 0;
  margin-top: 0;
}
And it does not work, there's still a margin:

Code:
<p.nomargin>blablabla</p>
<p.nomargin>blablabla</p>
}
JLius is offline   Reply With Quote
Old 11-24-2015, 03:46 AM   #19
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
You would be better of reversing your thinking. The paragraphs with a margin are the strange ones, not the other paragraphs. So, give the paragraphs with a margin a class and not the others. So take the example of Turtle91 (with a small correction: <p.break> should be <p class="break">) and it will produce the attached example (I changed the text).
Attached Files
File Type: epub break voorbeeld.epub (3.4 KB, 87 views)
Toxaris is offline   Reply With Quote
Old 11-24-2015, 04:38 AM   #20
JLius
Village idiot
JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.
 
JLius's Avatar
 
Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
Yes, I know Toxaris, thank you for your trouble. It's not my thinking that needs reversing, its my father's thinking when he wrote this messed up manuscript ;-) I tried your way before, but the document just got messed op because it is so inconsistent. And because most paragraphs had a margin anyway, I decided to make that the standard p. There are only a few paragraphs that are without the margin, so I just did those manually.
It's looking more or less ok now, I just hope my father won't notice the p's I missed somehow. He'll be the only one reading the epub anyway, on the reader I got him for his birthday.
JLius is offline   Reply With Quote
Old 11-24-2015, 05:57 AM   #21
Notjohn
mostly an observer
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: 1,518
Karma: 987654
Join Date: Dec 2012
Device: Kindle
Children always blame their parents. It's some comfort to know that, in time, the grandchildren will do the same to THEIR parents.
Notjohn is offline   Reply With Quote
Old 11-24-2015, 07:08 AM   #22
JLius
Village idiot
JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.
 
JLius's Avatar
 
Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
You're absolutely right
JLius is offline   Reply With Quote
Old 11-24-2015, 12:09 PM   #23
theducks
Well trained by Cats
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: 30,896
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Your code would be good if the you had set

P { display: block;
margin: 0 ; /* all 4 edges */
}

somewhere beforehand


display: block breaks the inheritance cascade and starts over (from the outside layer)

Think 'Box Model'
theducks is offline   Reply With Quote
Old 11-25-2015, 09:20 PM   #24
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,057
Karma: 144284144
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by theducks View Post
Your code would be good if the you had set

P { display: block;
margin: 0 ; /* all 4 edges */
}

somewhere beforehand


display: block breaks the inheritance cascade and starts over (from the outside layer)

Think 'Box Model'
I have a rather big dislike bordering on hate when I see the margin shorthand. I prefer it to be the long way because that just works better for modifying eBooks when the publisher screwed something up which is usually.
JSWolf is online now   Reply With Quote
Old 11-25-2015, 10:46 PM   #25
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by JSWolf View Post
I have a rather big dislike bordering on hate when I see the margin shorthand. I prefer it to be the long way because that just works better for modifying eBooks when the publisher screwed something up which is usually.
Jon:

Stop being daft. You're going to give yourself a stroke or a heart attack.

Hitch
Hitch is offline   Reply With Quote
Old 11-30-2015, 12:40 AM   #26
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,303
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by Toxaris View Post
So take the example of Turtle91 (with a small correction: <p.break> should be <p class="break">) and it will produce the attached example
sorry...must have been sleep-typing again...
Turtle91 is offline   Reply With Quote
Old 12-08-2015, 12:45 PM   #27
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,057
Karma: 144284144
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Hitch View Post
Jon:

Stop being daft. You're going to give yourself a stroke or a heart attack.

Hitch
It is easier. Most time the publisher does botch things up and I have to go fix them.
JSWolf is online now   Reply With Quote
Old 12-08-2015, 01:24 PM   #28
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by JSWolf View Post
It is easier. Most time the publisher does botch things up and I have to go fix them.
What, it's easier to give yourself a heart attack? Or a stroke? Sheesh, kiddo, listen, I'm the queen of rant, but dude, try to make sure it's for those things that matter!

Hitch
Hitch is offline   Reply With Quote
Old 12-08-2015, 01:50 PM   #29
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,057
Karma: 144284144
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Hitch View Post
What, it's easier to give yourself a heart attack? Or a stroke? Sheesh, kiddo, listen, I'm the queen of rant, but dude, try to make sure it's for those things that matter!

Hitch
This is where win. I can rant without getting upset.
JSWolf is online now   Reply With Quote
Old 12-08-2015, 03:39 PM   #30
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by JSWolf View Post
This is where win. I can rant without getting upset.
<snort>. Wiseass. Good for you!

Hitch
Hitch is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem: Merge two ebooks paragraph by paragraph... akayacik80 Workshop 5 09-23-2014 09:05 AM
Paragraph breaks when removing margins Canorka Conversion 3 03-30-2012 02:00 AM
Preference: Paragraph indent or a little paragraph spacing? 1611mac General Discussions 48 11-11-2011 12:43 AM
Paragraph question shrktank Calibre 2 11-29-2009 12:07 AM
Calibre collapses paragraph margins - why? kiwik Calibre 2 01-08-2009 11:47 PM


All times are GMT -4. The time now is 01:34 PM.


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