03-30-2014, 12:11 PM | #1 |
Junior Member
Posts: 4
Karma: 10
Join Date: Nov 2012
Device: Nook Simple Touch
|
Adding class attributes in bulk
Hi,
If I want to apply styles to consecutive paragraphs, how do I do that without going to code editor and adding/editing the class attribute to each one of them manually? Is there a way to select a range of tags/paragraphs and select a style to add? thanks, Laszlo |
03-30-2014, 04:17 PM | #2 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
Put the styles you want in a .style1 statement for paragraph 1 and .style2 statement for paragraph 2 in the stylesheet. Then <p class="style1"> or <p style="style2"> at the head of each paragraph, or have I missed something?
These are two items I use for two types of captions: .capt { margin-left: 15%; margin-right: 15%; font-size: 90%; text-align: justify; text-indent: 0; font-weight: bold; } .smcapt { margin-left: 15%; margin-right: 15%; font-size: 90%; text-align: center; text-indent: 0; font-weight: bold; } Last edited by mrmikel; 03-30-2014 at 06:13 PM. |
Advert | |
|
03-30-2014, 06:10 PM | #3 | |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
1. Press F2 to switch to Code View mode. 2. Select a couple of paragraphs with the mouse. 3. Right-click the selected paragraphs and select Mark Selected Text. 4. Search and replace the initial paragraph tag. For example: Find:<p> Replace:<p class="myclass"> You can also change the style of a number of paragraphs, by inserting a <div class="myclass"> tag before the first paragraph and a </div> after the last paragrah. You'll obviously need to define myclass in a stylesheet and link it to the .html file(s). |
|
03-31-2014, 01:52 AM | #4 |
Junior Member
Posts: 4
Karma: 10
Join Date: Nov 2012
Device: Nook Simple Touch
|
Thank you, guys.
So it's html editing only. I was hoping for GUI support for what you achieve with addClass in jQuery, but on static html text. |
03-31-2014, 06:36 AM | #5 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
The point at which to apply styling, which has priority, etc I am sure created more issues than John wanted to deal with. If it happened to work the way you wanted, I am sure there would be another faction asserting how nonsensical it was!
|
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem: Sigil Auto-adding Attributes to <p>'s | drummerboy | Sigil | 7 | 08-19-2012 10:50 AM |
Bulk Metadata + Adding Covers | Josieb1 | Library Management | 2 | 07-31-2012 12:46 PM |
bulk convert without adding to library or resorting my books | blort | Conversion | 2 | 01-24-2012 01:10 AM |
Possible to change author name format when bulk adding or importing? | himitsuhieki | Library Management | 6 | 08-19-2011 09:58 PM |
Adding in Bulk to Library | nikoleinox | Library Management | 3 | 06-13-2011 11:50 AM |