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

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 05-09-2019, 03:50 AM   #1
sladflob
Member
sladflob began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Feb 2013
Device: Kobo Touch, Aura One
display: none not working in ePub CSS

I have a book that contains a number of <hr class="transition"/> elements. When I read the book using KOReader on my Kobo this results in a long horizontal line which annoys me. I can get rid of the problem by removing all the <hr../> elements, but I thought a "better" way would be to use "display: none" in the book's stylesheet.

The stylesheet already contains a block for .transition so I figured that inserting "display: none;" at the top of that block would do what I want, but for some reason this does nothing. Just wondering if anyone can shed any light on what's going on. Like I said, I know I can fix it by deleting the tags but I'd like to learn a bit more about ePubs by changing the CSS.

Thanks.
sladflob is offline   Reply With Quote
Old 05-09-2019, 09:29 AM   #2
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,039
Karma: 3777777
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by sladflob View Post
I have a book that contains a number of <hr class="transition"/> elements. When I read the book using KOReader on my Kobo this results in a long horizontal line which annoys me. I can get rid of the problem by removing all the <hr../> elements, but I thought a "better" way would be to use "display: none" in the book's stylesheet.

The stylesheet already contains a block for .transition so I figured that inserting "display: none;" at the top of that block would do what I want, but for some reason this does nothing. Just wondering if anyone can shed any light on what's going on. Like I said, I know I can fix it by deleting the tags but I'd like to learn a bit more about ePubs by changing the CSS.

Thanks.
Try inserting "display: none;" at the end of the class ".transition". That because if you add that line at the beginning, it could be possible that some lines after, inside the .transition class, is something like "display: block;" that would overwrite what you wrote at the starting. So, write the property "display: none;" AT THE END.
RbnJrg is offline   Reply With Quote
Old 05-09-2019, 01:39 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: 1,760
Karma: 11819190
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone X/6/iPad 1,2 & Air/Surface Pro/Kindle PW
^^^ What RbnJrg said...

The LAST style processed has priority unless the style has higher 'specificity'.
Turtle91 is offline   Reply With Quote
Old 05-09-2019, 07:46 PM   #4
sladflob
Member
sladflob began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Feb 2013
Device: Kobo Touch, Aura One
Quote:
Originally Posted by RbnJrg View Post
Try inserting "display: none;" at the end of the class ".transition".
Worked perfectly. Thanks!
sladflob 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
Buy Non working kindle voyage with a working Display/Digitizer. SKK Flea Market 2 06-24-2017 10:35 PM
Kindle Previewer: error converting from epub with specific CSS and `display: none` arthurattwell Kindle Formats 3 08-10-2016 08:42 AM
Display block ... why? (Question about CSS and Calibre) NASCARaddicted ePub 7 06-23-2013 09:26 PM
working with fonts in css jayz Kindle Formats 9 10-29-2012 04:09 PM
Override ePub CSS with userStyle.css? barium Sony Reader Dev Corner 11 07-16-2011 03:25 PM


All times are GMT -4. The time now is 11:02 PM.


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