HTML Help with Blockquote Newspaper style for mobi

Status
Not open for further replies.
Joined
Oct 16, 2014
Messages
29
Reaction score
6
Location
Texas
I have a section of a book that is a newspaper article. I would like it to be indented on the left and right and have the text justified.

Is there a way to do this in HTML through tags or CSS? I've played around with the blockquote and the code tag but I'm still not getting the desired results.
 

Polenth

Mushroom
Super Member
Registered
Joined
Dec 27, 2007
Messages
5,017
Reaction score
735
Location
England
Website
www.polenthblake.com
Here's one way. In the html part, it'd be something like this: <p class="quote">Your newspaper article paragraph here.</p>

In the CSS part (changing 2 to whatever value you need):

p.quote
{
text-align:justify;
margin-right:2em;
margin-left:2em;
}


You could also apply this CSS to a blockquote tag, but the issue there is different readers might render blockquotes in different ways. Some might make it italic, some will indent it... you just never know. Which is why I favour styling basic paragraphs over things like blockquote.
 

WriterBN

Super Member
Registered
Joined
Feb 5, 2012
Messages
1,323
Reaction score
87
Location
Delaware
Website
www.k-doyle.com
What Polenth said--definitely style paragraphs instead of blockquotes. ePub validators sometimes have issues with markup within blockquotes.
 
Status
Not open for further replies.