![]() |
#1 |
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Apr 2013
Device: ipad
|
How do I assign different colors to different sections of text?
Let's say I have two classes of text on one page. How do I make each a different color. Here is what my xhtml and it's corresponding css file look like for reference.
[overlarge image put in spoiler tags - moderator] Spoiler:
Last edited by dreams; 06-12-2013 at 12:24 PM. Reason: placed overlarge image in spoiler |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Color in bookview can be done via CSS. Change of color in codeview is not possible.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
If it is important to you, you can right click to open your text in an external editor which does have this capability.
|
![]() |
![]() |
![]() |
#4 |
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Apr 2013
Device: ipad
|
I'm actually doing all of this by hand, not using Sigil or anything. Do you know how to make this happen in an editor?
|
![]() |
![]() |
![]() |
#5 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
In notepad++, you can get a similar effect by choosing Language, flash actionscript.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
What do you exactly want to colour?
The source code? You need some editor with syntax (or ad-hoc) highlight/colouring. The rendered text? Just add "color: #AA0000;" or whatever to the the CSS class. |
![]() |
![]() |
![]() |
#7 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
Nothing stopping you from creating .green, .yellow classes in the stylesheet, if you want to color the text displayed in the final document. See
http://www.w3schools.com/CSSref/pr_text_color.asp for details. Click the try it yourself button to see how changes will look prior to committing it to your document, if you are uncertain. BUT for those of us with e-ink readers, please preview in one. Some orange will just disappear completely against grey, etc. If you just want to color your code for easier readability see my previous text. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Troubleshooting K3 KB not fully refreshing, pixelated text, some inverted colors | kibbler1138 | Amazon Kindle | 7 | 01-09-2013 02:08 PM |
Increase Performance of Edit/Assign to Tags | convexdezign | Library Management | 9 | 04-28-2011 03:10 PM |
Assign multiple books to a collection | NLight95 | Library Management | 1 | 03-31-2011 09:20 PM |
PRS-600 Is it possible to assign books to folders designated to various genres? | BryanDanielson | Sony Reader | 6 | 01-10-2010 01:47 PM |
How do you assign categories?? | mrsp | Fictionwise eBookwise | 5 | 12-20-2007 12:20 PM |