06-05-2011, 08:32 AM | #1 |
eBook FANatic
Posts: 18,301
Karma: 16071131
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
|
Question for the CSS experts
I've run across a book from PG that uses a lot of the following to format poetry.
Code:
style="margin-left: 65%;" style="margin-left: 33%;" Code:
.marginleft65{ margin-left: 65%; } .marginleft33{ margin-left: 33%; } I began to wonder if there is some way to parameterize a CSS definition so that the actual value can be inserted as needed. e.g. Code:
.marginleft{ margin-left: ??; } Last edited by Jellby; 06-05-2011 at 08:42 AM. |
06-05-2011, 08:35 AM | #2 |
Guru
Posts: 971
Karma: 4999999
Join Date: Mar 2009
Location: Rosario, Argentina
Device: SONY PRS-T2, Kindle Paperwhite 11th gen
|
What are those two margins for?
|
Advert | |
|
06-05-2011, 08:41 AM | #3 |
frumious Bandersnatch
Posts: 7,536
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Not possible. At least not in CSS2 and without scripting.
By the way, I'd probably want the margins changed to something that wouldn't waste 65% of the limited width of a 5" screen... PG texts are often designed for computer screens. |
06-05-2011, 11:29 AM | #4 | |
Well trained by Cats
Posts: 30,451
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
I normally use 2 px just to clear the bezel edge |
|
06-05-2011, 01:09 PM | #5 |
eBook FANatic
Posts: 18,301
Karma: 16071131
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
|
I don't use them but it did get me wondering about methods to do something in CSS.
|
Advert | |
|
06-05-2011, 02:30 PM | #6 |
frumious Bandersnatch
Posts: 7,536
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
|
06-09-2011, 10:46 AM | #7 |
Wizard
Posts: 4,334
Karma: 4000000
Join Date: Oct 2008
Location: Paris
Device: Cybooks; Sony PRS-T1
|
@page ??
|
06-10-2011, 05:13 PM | #9 |
Wizard
Posts: 4,334
Karma: 4000000
Join Date: Oct 2008
Location: Paris
Device: Cybooks; Sony PRS-T1
|
Ok. Good to know.
Tanks; |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Question about validation and items referenced in css | ldolse | Sigil | 9 | 02-02-2011 05:17 AM |
stupid question about epub? (nook + css) | hapax legomenon | ePub | 0 | 10-31-2010 04:35 AM |
newbie with a question for the experts | swimr29 | Amazon Kindle | 7 | 11-09-2009 12:34 PM |
A question about CSS: widows and orphans | Jellby | ePub | 5 | 08-31-2009 04:54 PM |
Question to Experts | srinivasvaradar | Sony Reader | 3 | 09-30-2007 05:05 PM |