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 03-21-2010, 07:19 AM   #1
ghostyjack
Guru
ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.
 
ghostyjack's Avatar
 
Posts: 679
Karma: 1085478
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-600, Acer 1825PT, Galaxy Tab, PRS-T1, HTC One X, TF700T
Centering blockquotes

Does anyone know how to centre a blockquote?

I'm trying to get some text that is centred in the horizontal alignment but still have the text aligned to the left or the right.

This would be most useful for me when I've got a quote and also who quoted it with the author of the quote to the right.

Example

Code:
p.right {text-align: right;}
blockquote {width: 60%;}

<blockquote>"This is a test quote, not actually written by anyone. So I'd thought I'd use it for this example"
<p class="right">-the author.</p>
</blockquote>
The above example allows me to be able to adjust the width to align the author to the end of the text and not the edge of the screen but the blockquote is on the left.

How do I move the blockquote so it is centred?
__________________
Get 5GB of online storage for free from SugarSync. Click here for an additional 500MB to give you 5.5GB for free.
Always have your stuff when you need it with @Dropbox. 2GB account is free! Click here
Currently working on updating some of my Lovecraft work after receiving some corrections
ghostyjack is offline   Reply With Quote
Old 03-21-2010, 08:16 AM   #2
pietvo
Reader
pietvo shines like a glazed doughnut.pietvo shines like a glazed doughnut.pietvo shines like a glazed doughnut.pietvo shines like a glazed doughnut.pietvo shines like a glazed doughnut.pietvo shines like a glazed doughnut.pietvo shines like a glazed doughnut.pietvo shines like a glazed doughnut.pietvo shines like a glazed doughnut.pietvo shines like a glazed doughnut.pietvo shines like a glazed doughnut.
 
pietvo's Avatar
 
Posts: 500
Karma: 8718
Join Date: Aug 2009
Location: Cochabamba, BO
Device: Onyx Boox 60, iPod Touch
This would center the whole blockquote with respect to its environment:
Code:
blockquote {margin: 0 auto; width: 60%;}
It is said that Internet Explorer has troubles with this, but that might be solved by putting a div around it with
Code:
text-align: center
pietvo is offline   Reply With Quote
 
Enthusiast
Old 03-21-2010, 10:34 AM   #3
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: 5,133
Karma: 2460081
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
Why not this?

Code:
blockquote: { margin: 0 20%; }
(or add some vertical margin instead of the 0)
Jellby is online now   Reply With Quote
Old 03-21-2010, 05:05 PM   #4
pietvo
Reader
pietvo shines like a glazed doughnut.pietvo shines like a glazed doughnut.pietvo shines like a glazed doughnut.pietvo shines like a glazed doughnut.pietvo shines like a glazed doughnut.pietvo shines like a glazed doughnut.pietvo shines like a glazed doughnut.pietvo shines like a glazed doughnut.pietvo shines like a glazed doughnut.pietvo shines like a glazed doughnut.pietvo shines like a glazed doughnut.
 
pietvo's Avatar
 
Posts: 500
Karma: 8718
Join Date: Aug 2009
Location: Cochabamba, BO
Device: Onyx Boox 60, iPod Touch
Of course it will do the same. But the other one is usually more logical with respect to style. For example when you are interested in specifying the width of the box in the first place and not so much in the exact size of the margins. Also when you want to give the size of the boxquote in absolute amounts (pixels, cm, inches) you have to use that form. So I would in general call the last for a premature optimization.
pietvo is offline   Reply With Quote
Old 03-25-2010, 06:16 AM   #5
ghostyjack
Guru
ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.
 
ghostyjack's Avatar
 
Posts: 679
Karma: 1085478
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-600, Acer 1825PT, Galaxy Tab, PRS-T1, HTC One X, TF700T
Thanks guys, these tips have helped solve my problem.
__________________
Get 5GB of online storage for free from SugarSync. Click here for an additional 500MB to give you 5.5GB for free.
Always have your stuff when you need it with @Dropbox. 2GB account is free! Click here
Currently working on updating some of my Lovecraft work after receiving some corrections
ghostyjack 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
Centering PDF nguirado Amazon Kindle 5 10-04-2010 08:45 PM
How to do centering sjohnson717 Calibre 15 02-28-2010 09:20 AM
ebook publisher & blockquotes Chauncey IMP 5 02-10-2010 10:43 AM
centering images with css override? Amalthia Calibre 2 03-30-2009 01:53 PM
Bookdesigner - Centering Title Author... davers Workshop 7 01-12-2009 04:21 PM


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


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