View Full Version : Removing indent for individual paragraphs


Alda
07-15-2013, 11:10 AM
Hello,

I'm trying to remove an indent for a single paragraph, but no matter what I try I'm not successful. The paragraph class is "p3" and it seems to be set this way by default (I imported the file from Scrivener). Do I need to change the paragraph classification, and then add something to my style sheet? If yes, can anyone help with the code?

Thank you!

theducks
07-15-2013, 11:45 AM
This appears to be a EPUB / CSS question. Moving to correct forum.

RbnJrg
07-15-2013, 12:24 PM
Hello,

I'm trying to remove an indent for a single paragraph, but no matter what I try I'm not successful. The paragraph class is "p3" and it seems to be set this way by default (I imported the file from Scrivener). Do I need to change the paragraph classification, and then add something to my style sheet? If yes, can anyone help with the code?

Thank you!

Let's suppose that you have in your .html file the following code:

<p class="p3">Some text indented...</p>

Then, do the following:

1. In your css stylesheet, write:

.noindent {
text-indent: 0;
}

2. In your .html file, where you want that the paragraphs are not indented, add the following code:

<p class="p3 noindent">Some text indented but now will be not indented...</p>

That should fix your issues. In the case that you want that all the paragraphs with the "p3" class are not indented, then instead of the previous solution, in your css stylesheet do the following:

1. Locate the place where is the "p3" class. You'll find something like:

.p3 {
... some declarations
... " "
}

2. Inside the p3 class, where you read the property "text-indent: any number;" change it by "text-indent: 0;". If you can't find that property, then write it yourself: "text-indent: 0;"

3. Save your changes.

After that, all the paragraphs with the "p3" class should be not indented.

Regards
Rubén

}

Jellby
07-15-2013, 12:42 PM
1. Locate the place where is the "p3" class. You'll find something like:

.p3 {
... some declarations
... " "
}

2. Inside the p3 class, where you read the property "text-indent: any number;" change it by "text-indent: 0;". If you can't find that property, then write it yourself: "text-indent: 0;"

In the latter case, make sure that the property *before* your new one ends with a semicolon (;), or add your new property as the first one. (This is basic CSS syntax.)