Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 03-15-2017, 07:53 AM   #1
MountainMan1
Junior Member
MountainMan1 might easily be mistaken for a TexanMountainMan1 might easily be mistaken for a TexanMountainMan1 might easily be mistaken for a TexanMountainMan1 might easily be mistaken for a TexanMountainMan1 might easily be mistaken for a TexanMountainMan1 might easily be mistaken for a TexanMountainMan1 might easily be mistaken for a TexanMountainMan1 might easily be mistaken for a TexanMountainMan1 might easily be mistaken for a TexanMountainMan1 might easily be mistaken for a TexanMountainMan1 might easily be mistaken for a Texan
 
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>
If you put that into the header, you can have tabs with the em; tag, just by putting <tab1> your paragraph of text </tab1> in each spot where you want to have a tab in the text such as the beginning of a paragraph.

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
MountainMan1 is offline   Reply With Quote
Old 03-24-2017, 04:21 AM   #2
Phssthpok
Evangelist
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 432
Karma: 95229
Join Date: Nov 2014
Device: Horrible Kindle
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.
Phssthpok is offline   Reply With Quote
Advert
Old 04-19-2017, 07:24 AM   #3
MountainMan1
Junior Member
MountainMan1 might easily be mistaken for a TexanMountainMan1 might easily be mistaken for a TexanMountainMan1 might easily be mistaken for a TexanMountainMan1 might easily be mistaken for a TexanMountainMan1 might easily be mistaken for a TexanMountainMan1 might easily be mistaken for a TexanMountainMan1 might easily be mistaken for a TexanMountainMan1 might easily be mistaken for a TexanMountainMan1 might easily be mistaken for a TexanMountainMan1 might easily be mistaken for a TexanMountainMan1 might easily be mistaken for a Texan
 
Posts: 9
Karma: 18320
Join Date: Feb 2017
Device: None
Quote:
Originally Posted by Phssthpok View Post
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.
Yes, it is a large indent, on the forum or site where I found that style technique the original poster had a long list of them. I think the subject was about indents in HTML documents, and if I remember correctly the poster may have said he had a number of indents progressively larger so that he could have data in rows and columns and keep it looking neat. Something like that.

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 07:58 AM. Reason: A thanks to a helpful post
MountainMan1 is offline   Reply With Quote
Old 04-19-2017, 10:17 AM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 23,191
Karma: 24100002
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab A, Kobo Aura2
Quote:
Originally Posted by MountainMan1 View Post

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
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
theducks is offline   Reply With Quote
Reply

Tags
editor, style, tag

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding body style to Extra CSS does nothing Barty Conversion 7 10-23-2013 11:06 PM
How to Select Entire Book? Tom SKP Sigil 4 05-18-2013 04:18 PM
Only able to add one book out of entire library read4fun Calibre 2 11-22-2011 12:32 PM
Style Question - Capitalizing entire words galavanter General Discussions 12 09-27-2010 11:59 PM
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 09:42 AM


All times are GMT -4. The time now is 01:45 AM.


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