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

Go Back   MobileRead Forums > E-Book Software > Calibre > Viewer

Notices

Reply
 
Thread Tools Search this Thread
Old 08-19-2022, 01:42 PM   #361
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: 73,514
Karma: 126422064
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 rockster View Post
I forget about that. Thanks.
That could be why the CSS code isn't working.

Your welcome.
JSWolf is offline   Reply With Quote
Old 08-29-2022, 07:25 AM   #362
ThomasSeeker
Junior Member
ThomasSeeker began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2022
Device: Kindle
List of css-element identifiers?

Hey guys,

I searched the web without success for a list of all the css-element identifiers. Can someone help me please?

The most urgent one is the one for the background-colour of the highlighted text-sections (currently a really aggressive piss-yellow ... ;-))

Please help!
ThomasSeeker is offline   Reply With Quote
Advert
Old 08-29-2022, 01:46 PM   #363
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: 29,662
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
https://www.w3schools.com/cssref/default.asp

Just remember that all you see there does not apply (at all) to EPUB.
It may look fine in Calibre or Sigil preview, but the acid test is the REAL device
theducks is online now   Reply With Quote
Old 08-29-2022, 03:59 PM   #364
ThomasSeeker
Junior Member
ThomasSeeker began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2022
Device: Kindle
Thank you theducks, for trying to help!

But in the list behind your link I did not find a working selector for highlighted text.

Somewhere else I found "::selection".

This is what I chose instead of the default piss-yellow:

::selection { color: white; background: #45b1e9;}

So beautiful! I'm happy now!

:-)
ThomasSeeker is offline   Reply With Quote
Old 08-29-2022, 04:05 PM   #365
ThomasSeeker
Junior Member
ThomasSeeker began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2022
Device: Kindle
PS: Here is the list of the CSS Selectors:

https://www.w3schools.com/cssref/css_selectors.asp
ThomasSeeker is offline   Reply With Quote
Advert
Old 08-30-2022, 05:10 AM   #366
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: 73,514
Karma: 126422064
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 ThomasSeeker View Post
PS: Here is the list of the CSS Selectors:

https://www.w3schools.com/cssref/css_selectors.asp
But which ones are available for ePub? Not all of them are.
JSWolf is offline   Reply With Quote
Old 08-30-2022, 06:34 AM   #367
ThomasSeeker
Junior Member
ThomasSeeker began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2022
Device: Kindle
Good question, JSWolf! ... I'd like to know too!
ThomasSeeker is offline   Reply With Quote
Old 08-30-2022, 08:37 AM   #368
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: 73,514
Karma: 126422064
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 ThomasSeeker View Post
Good question, JSWolf! ... I'd like to know too!
Once you figure out what's supported, you have to then figure out what's ePub 2 and what's ePub 3. And just because it's supposed to be supported, it may not be in some programs. So if you can do without them, do so and use a work around that does work.

For example, p::first-letter can be done away with by using a <span> to do the same thing.
JSWolf is offline   Reply With Quote
Old 10-01-2022, 06:42 PM   #369
echej
Junior Member
echej began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2021
Device: Kindle Paperwhite
Could anyone share a css that is similar to the one as in Calibre-web or in Apple Books?
echej is offline   Reply With Quote
Old 11-05-2022, 05:30 AM   #370
sanon
Member
sanon knows the complete value of PI to the endsanon knows the complete value of PI to the endsanon knows the complete value of PI to the endsanon knows the complete value of PI to the endsanon knows the complete value of PI to the endsanon knows the complete value of PI to the endsanon knows the complete value of PI to the endsanon knows the complete value of PI to the endsanon knows the complete value of PI to the endsanon knows the complete value of PI to the endsanon knows the complete value of PI to the end
 
Posts: 16
Karma: 31960
Join Date: Apr 2016
Device: none
Hello everyone,

I've installed a new font, "Barlow Semi Condensed", and updated my css as follows:

p {
line-height: 1.6;
background-color: #4d4d4d;
font-family: "Barlow Semi Condensed" !important;
text-align: left !important;
}

Doesn't seem to be working though... The font has changed into something but it's not BSC. What am I doing incorrectly? Thanks.

EDIT: Solution for anyone interested:
Windows, for whatever reason, has installed 4 out of 18 "Barlow Semi Condensed" fontfaces under "Barlow". These are "regular", "italic", "bold" and "bold italic". So, "font-family: Barlow !important;" is the solution.

Any idea why Windows does this and how to fix it?

Last edited by sanon; 11-05-2022 at 05:49 AM.
sanon is offline   Reply With Quote
Old 01-21-2023, 11:31 AM   #371
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 917
Karma: 6371944
Join Date: Sep 2020
Device: Calibre E-book viewer
Today I needed to add spacing between paragraphs, but couldn't find a rule that would stick, then after several unsuccessful attempts I found this:

https://stackoverflow.com/questions/...34345#25234345

Now I'm using:

p + p {margin-top: 0.4em !important;}
Comfy.n is offline   Reply With Quote
Old 02-10-2023, 03:27 AM   #372
Abhi
Junior Member
Abhi began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Feb 2023
Device: none
Smile My css for calibre eBook viewer

Scrapped from Android eBook reader


Quote:
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative&family=Libre+Baskerv ille&display=swap');

strong {color: #00B095;font-weight: 900;font-size: 105%;}

em, i {color: #FF9E00;font-weight: 900;font-size: 105%;}

span {display: inline;}

body {font-family: 'Libre Baskerville', serif;background-color: #988E7A;color: #191919;padding: 10px;word-wrap: break-word;}

img {max-width: 100%;}

h1, h2, h3, h4, h5, h6 {font-family: 'Cinzel Decorative',cursive;text-align: center;color: #FFF;font-weight: 400}

hr {border: 2px solid; border-radius: 2px;}
Abhi is offline   Reply With Quote
Old 08-20-2023, 06:10 PM   #373
aldobelus
Junior Member
aldobelus began at the beginning.
 
aldobelus's Avatar
 
Posts: 1
Karma: 10
Join Date: Aug 2023
Location: Cantabria.
Device: none
Quote:
Originally Posted by sideburnt View Post
If you're interested in CSS Styling take a quick look at
http://epubzengarden.com/?style=trad.../chapter1.html

Its a very new site but could become fantastic with a bit of contribution.

Hard to navigate around and took me a while to find the css preview page, I have linked to my favorite page style used on this site.
At this site there's nothing to be interested. It's a different text, nothing to do with CSS.
aldobelus is offline   Reply With Quote
Old 08-21-2023, 03:24 PM   #374
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,367
Karma: 305065800
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by aldobelus View Post
At this site there's nothing to be interested. It's a different text, nothing to do with CSS.
That's because you're reading and commenting on a 14-year old post.

You might be able to find old versions at the internet archive, although they might not be functional. Here's the About page from 2009:

https://web.archive.org/web/20090825...den.com/about/
pdurrant 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
Custom CSS for output deckoff Calibre 1 08-28-2010 11:55 PM
ePub with custom .css on a 505 dicknskip Sony Reader Dev Corner 3 06-09-2010 11:34 PM
User stylesheets for ePub files salty-horse Sony Reader Dev Corner 12 02-23-2010 07:44 AM
ePub conversion: override existing css with a custom one sbin Calibre 1 01-09-2010 04:03 AM
Calibre's generated css for epub brewt Calibre 7 12-29-2008 09:59 AM


All times are GMT -4. The time now is 07:14 AM.


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