Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 07-30-2009, 02:12 AM   #1
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,165
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
IMG css override not working anymore?

Hi, I've upgraded to 6.0 and this code no longer works? I've entered into the Look and Feel Extra CSS section.

img {text-align: center;}
Amalthia is offline   Reply With Quote
Old 07-30-2009, 01:12 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,562
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
What is your output format?
kovidgoyal is offline   Reply With Quote
Advert
Old 07-30-2009, 01:37 PM   #3
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,165
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by kovidgoyal View Post
What is your output format?
LRF is the output format. Input is HTML.
Amalthia is offline   Reply With Quote
Old 07-30-2009, 02:57 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,562
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Hmm, it may have broken. Open a ticket and attach your HTML file.
kovidgoyal is offline   Reply With Quote
Old 07-30-2009, 03:53 PM   #5
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,165
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by kovidgoyal View Post
Hmm, it may have broken. Open a ticket and attach your HTML file.
I'll test it one more time at home because I remembered sometimes turning off the program and restarting it sometimes helps the settings work. But yes, if the problem persists I'll open a ticket. I ended up eventually just adding the <p align="center"> to the image file and that worked. But I'd like to move away from adding more code to the html file if possible.
Amalthia is offline   Reply With Quote
Advert
Old 07-31-2009, 06:49 AM   #6
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,536
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Amalthia View Post
Hi, I've upgraded to 6.0 and this code no longer works? I've entered into the Look and Feel Extra CSS section.

img {text-align: center;}
Is that supposed to work?

That would mean, AFAIK, that whatever inside the <img> will be centered in the <img>, but the <img> has no content, it is content itself, what you need is adding "text-align: center" to the parent element, <div>, <p> or whatever, so that the <img> is centered inside it.

Similarly, adding "text-align: center" to a <table> does not center the table on the page, but it centers the text inside the table cells.
Jellby is offline   Reply With Quote
Old 07-31-2009, 02:29 PM   #7
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,165
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by Jellby View Post
Is that supposed to work?

That would mean, AFAIK, that whatever inside the <img> will be centered in the <img>, but the <img> has no content, it is content itself, what you need is adding "text-align: center" to the parent element, <div>, <p> or whatever, so that the <img> is centered inside it.

Similarly, adding "text-align: center" to a <table> does not center the table on the page, but it centers the text inside the table cells.
It worked in the past. I'd normally add this code to my html <p><img src=""></p>

and the css override would center the image. Not sure if it's supposed to work or not but it did before.

Still need to test this again.

I had some deadlines for converting this week so I was using 5.13 on my other computer.
Amalthia is offline   Reply With Quote
Old 08-01-2009, 06:27 AM   #8
rogue_ronin
Banned
rogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-books
 
Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
Try this:
Code:
img {
display: block;
margin-left: auto;
margin-right: auto }
With this, you shouldn't have to put the images into paragraph tags.

m a r
rogue_ronin is offline   Reply With Quote
Old 08-02-2009, 11:25 PM   #9
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,165
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by rogue_ronin View Post
Try this:
Code:
img {
display: block;
margin-left: auto;
margin-right: auto }
With this, you shouldn't have to put the images into paragraph tags.

m a r
thanks! I'll try this out.
Amalthia is offline   Reply With Quote
Old 08-03-2009, 01:17 AM   #10
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Quote:
Originally Posted by rogue_ronin View Post
Try this:
Code:
img {
display: block;
margin-left: auto;
margin-right: auto }
With this, you shouldn't have to put the images into paragraph tags.
That results in invalid (X)HTML, though - IMG is an inline element, it can't exist outside a block element. A standard-conforming reader should refuse to render it.
pepak is offline   Reply With Quote
Old 08-03-2009, 02:12 AM   #11
rogue_ronin
Banned
rogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-books
 
Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
Quote:
display: block;
Turns it into a block element.

m a r
rogue_ronin is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedding Chinese font using CSS override? kome17 Calibre 0 09-18-2009 01:57 AM
css override code for margins? Amalthia Calibre 15 08-11-2009 08:20 PM
help with Claibre CSS override sideburnt Calibre 7 05-28-2009 09:25 PM
centering images with css override? Amalthia Calibre 2 03-30-2009 02:53 PM
css override code for <h2> and <h1> tags Amalthia Calibre 2 03-29-2009 07:51 PM


All times are GMT -4. The time now is 08:03 PM.


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