|
|
#1 |
|
eBook FANatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18,301
Karma: 16078357
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 07:42 AM. |
|
|
|
|
|
#2 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 974
Karma: 4999999
Join Date: Mar 2009
Location: Rosario, Argentina
Device: SONY PRS-T2, Kindle Paperwhite 11th gen
|
What are those two margins for?
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,570
Karma: 20150435
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. |
|
|
|
|
|
#4 | |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,241
Karma: 61360164
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
|
|
|
|
|
|
|
#5 |
|
eBook FANatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18,301
Karma: 16078357
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 | |
|
|
|
|
#6 |
|
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,570
Karma: 20150435
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
|
|
|
|
|
|
#7 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,338
Karma: 4000000
Join Date: Oct 2008
Location: Paris
Device: Cybooks; Sony PRS-T1
|
@page ??
|
|
|
|
|
|
#9 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,338
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 04:17 AM |
| stupid question about epub? (nook + css) | hapax legomenon | ePub | 0 | 10-31-2010 03:35 AM |
| newbie with a question for the experts | swimr29 | Amazon Kindle | 7 | 11-09-2009 11:34 AM |
| A question about CSS: widows and orphans | Jellby | ePub | 5 | 08-31-2009 03:54 PM |
| Question to Experts | srinivasvaradar | Sony Reader | 3 | 09-30-2007 04:05 PM |