![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,185
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
CSS <body> vs. <p> question
Hi,
For the longest time I've been specifying a font size in my <P> tag in the css override box, and I'm not sure if I should have been adding it to the <body> tag instead? What brings this up is that I'm using the Fanfiction Downloader plugin and the source files it converts sometimes don't have a <p> tag at the start of the paragraph. In fact, some of these stories have zero tags at the beginning of the sentence, as a result the text is small and hard to read. However, I'm not sure how to code for sentences that have no html coding tags to use? I thought adding the font size to the body tag would fix these types of paragraphs, however before I made a change like that I'd like to know if anyone else adds the font size into their css override body tag? Are there side effects? or does it work just like the paragraph tag? or does the body tag font mess up heading sizes? I'd appreciate any and all help. |
![]() |
![]() |
![]() |
#2 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
If you change the font size in the body tag, then everything within the body tag will inherit that size. Unless overridden by more specific css later on.
http://www.webdesignfromscratch.com/...tance-cascade/ font-size IS an inherited attribute. |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,185
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Quote:
I think the confusing part is that I'm using two different areas to convert ebooks, one is the default Calibre conversion and the other is Fanfiction Downloader conversion settings. In the Calibre conversion settings I do not have font size listed in my css override codes because it's not needed. In FFDL, I need to specify a font size. Though, maybe that has changed. I will run some tests. |
|
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
You might be looking at this in the wrong way.
If the code doesn't have p tags to indicate the paragraph, what does it have? Does it use two br's? Or something else? If it is br's, then adding the option "replace_br_with_p: true" into the personal.ini for the site might help. Otherwise, I suggest mentioning it in the FFDL thread might prompt a suggestion or a fix to the downloaded for the site. |
![]() |
![]() |
![]() |
#5 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,185
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Quote:
for example the author would have: Quote:
|
||
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,037
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
not only: The mark opens with a lowercase p and closes with an uppercase /P |
|
![]() |
![]() |
![]() |
#7 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Or you can fix the code yourself. The following regex should find them these problems: Code:
(<p>\*.*)</P>(\s+)(\w+.*)(\s+<p>) Code:
\1</p>\2<p>\3</p>\4 |
|
![]() |
![]() |
![]() |
#8 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,185
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Quote:
I can post something at the FFDL thread to see if there is a way to find these orphan paragraphs and add some paragraph tags to them because I've seen it on many stories. currently, switching to using the font-size in the <body> tag has seemed to fix the problem. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
force an addition to main body css ? | cybmole | Conversion | 5 | 01-17-2014 02:35 AM |
Adding body style to Extra CSS does nothing | Barty | Conversion | 7 | 10-23-2013 11:06 PM |
How to change the font-size in the body tag in css? | naisren | Conversion | 2 | 10-01-2012 05:52 PM |
CSS question | crutledge | Workshop | 17 | 12-17-2011 07:52 AM |
CSS Question | AppleTard | Calibre | 1 | 06-12-2011 12:07 AM |