03-15-2017, 08:53 AM | #1 |
Junior Member
Posts: 9
Karma: 18320
Join Date: Feb 2017
Device: None
|
Adding a Style to an entire book
I am not very knowledgeable about HTML editing and CSS and such. I have just found a style that can be added to an HTML document in the <head> block, and it will apply the style to the whole document. This one kind of lets you have tabs, using the em; HTML tag.
I don't want to have to put this into the header of every page manually, and I don't know how to write a CSS stylesheet. I was wondering if there was any way to put this in one of the text files and have it work in all the rest of the text files. Here is an example of the code : Code:
<style type="text/css"> dummydeclaration { padding-left: 4em; } /* Firefox ignores first declaration for some reason */ tab1 { padding-left: 4em; } tab2 { padding-left: 8em; } tab3 { padding-left: 12em; } </style> I asked another question about having Editor insert tabs here in the forum, but if Editor can't do that for me then I can use this. I will put it in the <head> of every page if I have to, was just hoping that there might be some way to put it in one page and have it work for all of the rest. Thanks |
03-24-2017, 05:21 AM | #2 |
Age improves with wine.
Posts: 571
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
|
Put the styles in a CSS file (press the "add file" button in the top left and call the file something.css, then copy all the rules between <style> and </style> into the new file), then just select all the HTML files, right-click and select "Link stylesheets", then select your CSS file to be linked to all the HTML files.
4em is a pretty huge indent, IMHO. |
04-19-2017, 08:24 AM | #3 | |
Junior Member
Posts: 9
Karma: 18320
Join Date: Feb 2017
Device: None
|
Quote:
HTML doesn't have 'native' tabs, so this was someone's work-around for that. Of course you can use tables, but some people don't want or need to use tables in a particular HTML document, and the poster showed this as a way not to have to put a table into the document if you didn't want to. I believe that was the purpose, don't remember where I stumbled across this technique so can't really say for sure. Edit: Phssthpok, I gave you some Karma for the helpful post, but I don't know for sure how the KARMA system works here, so I don't know if giving you 10 KARMA was good or bad, my intentions were to the good though Last edited by MountainMan1; 04-19-2017 at 08:58 AM. Reason: A thanks to a helpful post |
|
04-19-2017, 11:17 AM | #4 |
Well trained by Cats
Posts: 30,444
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
There is no BAD Karma at MR, so it is all good. the longer you participate here , the more Karma you will be able to award (you can reduce the suggested amount) 99 K (so you don't get a swell head right off )coming your way
|
Tags |
editor, style, tag |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding body style to Extra CSS does nothing | Barty | Conversion | 7 | 10-24-2013 12:06 AM |
How to Select Entire Book? | Tom SKP | Sigil | 4 | 05-18-2013 05:18 PM |
Only able to add one book out of entire library | read4fun | Calibre | 2 | 11-22-2011 01:32 PM |
Style Question - Capitalizing entire words | galavanter | General Discussions | 12 | 09-28-2010 12:59 AM |
US Kindle free book: Outta the bag [SHORT STORY ONLY - NOT ENTIRE BOOK] | greencat | Deals and Resources (No Self-Promotion or Affiliate Links) | 1 | 08-22-2010 10:42 AM |