![]() |
#1 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 86
Karma: 470352
Join Date: Dec 2012
Device: Kindle Fire, IPad
|
Adding a css page to an e pub
I have a question regarding this subject, I know how to add a stylesheet but in this case I see the default font for this e pub is Times New Roman.
I'm trying to add an underline to certain words and I need to know how to set up the stylesheet as I only know how to do this by adding a different font. Do I still have to add the font and the style to css in the e pub doc in order to see an underline in the default font as I see it in Sigil but do not see it in the published e pub and mobi. ?? thx |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
If you need underline, you can add the following in your stylesheet:
Code:
.under { text-decoration: underline; } Code:
<p>The word <span class="under">underline</span> is underlined.</p> |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,047
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:
BTW TNR, while fairly common, is a licensed font and may not be distributed without permission. (fairly common: not all devices support this natively) |
|
![]() |
![]() |
![]() |
#4 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 86
Karma: 470352
Join Date: Dec 2012
Device: Kindle Fire, IPad
|
I went ahead and added the font ZTimes New Roman to the Font folder of the E pub in Sigil. Added a stylesheet and created 3 styles, underline, underline bold and centerBold.
These are now visible in the published e pub and mobi when I went to validate first I got the msg that "the font is in the manuscript but not used" so I removed the font from the folder and now it says OEBPS/styles/fonts / timesNewRoman.ttf is reachable but not present in the manifest. this is true as I deleted it but I was looking for instances of the font mentioned and cannot find anywhere in the e pub. heres the .css code I used @font-face { font-family: Times New Roman; font-style: normal; font-weight: normal; src:url("Fonts/Times New Roman.ttf"); } p.letterULine { font-family: "Times New Roman"; font-weight: normal; font-style: normal; font-size:1.5em; line-height: 1.20em; text-decoration: underline; font-variant: normal; text-indent: 0em; text-align: left; color: #000000; margin: 1em 0 0 0; -webkit-hyphens:none; } p.letterULineBold { font-family: "Times New Roman"; font-weight: bold; font-style: normal; font-size:1.5em; line-height: 1.20em; text-decoration: underline; font-variant: normal; text-indent: 0em; text-align: left; color: #000000; margin: 1em 0 0 0; -webkit-hyphens:none; } p.letterBold { font-family: "Times New Roman"; font-weight: bold; font-style: normal; font-size:1.5em; line-height: 1.20em; text-decoration: none; font-variant: normal; text-indent: 0em; text-align: left; color: #000000; margin: 1em 0 0 0; -webkit-hyphens:none; } p.letterCenter { font-family: "Times New Roman"; font-weight: normal; font-style: normal; font-size:1.5em; line-height: 1.20em; text-decoration: none; font-variant: normal; text-indent: 0em; text-align: center; color: #000000; margin: 1em 0 0 0; -webkit-hyphens:none; } span.emphasis { font-weight: normal; font-style: normal; } |
![]() |
![]() |
![]() |
#5 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,047
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:
Common Sigil type error |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 86
Karma: 470352
Join Date: Dec 2012
Device: Kindle Fire, IPad
|
Ok, So do I re add the font to the folder in Sigil? Or disregard the error and publish the file the way it is?
R |
![]() |
![]() |
![]() |
#7 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,047
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:
Edit your CSS to include the ../ ![]() Text, Images,Styles,Fonts are all branches |
|
![]() |
![]() |
![]() |
#8 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 86
Karma: 470352
Join Date: Dec 2012
Device: Kindle Fire, IPad
|
Fixed, thx
R |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
e-pub to pdf:- page size conundrum | MrB | Conversion | 2 | 10-03-2012 09:42 AM |
creating E pub page thumbnails | ralphiedee | ePub | 6 | 04-06-2012 11:28 AM |
PRS-T1 Adding two fonts into the CSS? | WarGhSt | Sony Reader | 1 | 02-02-2012 01:41 AM |
adding a CSS to a file | BeccaPrice | Calibre | 8 | 09-18-2011 03:52 PM |
Adding new chapter, what about CSS link? | spaze | Sigil | 3 | 02-24-2011 05:35 AM |