Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 03-11-2025, 06:06 PM   #1
PilcrowandStanza
Member
PilcrowandStanza began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Dec 2023
Device: none
bullet style (using a different character)

Hi all,

Is it possible to change the style of bullets in an epub ordered list?
In the print version, I have them as little boxes (like a checkbox). Is there a way to designate a style for the bullets themselves?

Or, would i have to add the character in each line (unordered) instead? (more work)

CSS tips appreciated!
Thanks
PilcrowandStanza is offline   Reply With Quote
Old 03-11-2025, 06:12 PM   #2
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Sure. See examples here... https://www.w3schools.com/cssref/pr_list-style-type.php

Just be aware that maybe not all ereaders will display the different types.
Karellen is offline   Reply With Quote
Advert
Old 03-11-2025, 10:58 PM   #3
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,337
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
The W3Schools example in Karellen’s post lets you change the color of an html bullet, but you can also use images like so:

Code:
li::before {
  content: "•"; /* Insert content that looks like bullets */
  padding-right: 8px;
  color: blue; /* Or a color you prefer */
}


li::before {
  content: "url(../Images/bullet.png)";
  padding-right: 8px;}
As mentioned before, make sure you test on your target market’s devices/apps. Some of the more ancient devices may not support the pseudo-element ::before and you may need to provide fallback coding to cover those cases.

Also, make sure you pick a good image that works with different devices… eg. some may not look so good if it is a simple black image when the user selects night mode… you may not be able to see the bullet!!

Cheers!


EDIT:
Serves me right for trying to respond after a 12-hr work day from my phone...without testing...

Here is the code I should have posted

Code:
li::before {
  content: "";
  width:1em; height:1em;
  display: inline-block;
  background-image: url("../Images/bullet.svg");
  background-repeat:no-repeat;
  background-size:contain; 
}
Putting the image into the content line (with the quotes inside the parenthesis) works, but you can't adjust the size of the image - it is static.
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2025-03-12 101856.png
Views:	67
Size:	168.3 KB
ID:	214291  

Last edited by Turtle91; 03-12-2025 at 10:30 AM.
Turtle91 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with style settings and screen dpi to match my kindle reader style Gaqs KOReader 3 05-13-2022 06:02 AM
Forma Should I get the origami-style case or the simple one-fold-style for my Forma? droopy Kobo Reader 8 08-25-2019 05:15 PM
Style Sheet entry for a 'hanging' style AThirstyMind Kindle Formats 6 12-10-2016 12:28 AM
list-style-type bullet odedta ePub 14 06-18-2014 09:53 AM


All times are GMT -4. The time now is 09:18 AM.


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