2016-03-28 9 views
0

でリストを文字入り、私はこのように、単一の文字入りのリストのスタイルをしたいと思います:はEPUBでEPUB

ol.alpha_list { 
    counter-reset: item; 

} 

ol.alpha_list > li { 
    list-style: none; 
    position: relative; 
} 

ol.alpha_list li:before { 
    counter-increment: item; 
    content:"(" counter(item, lower-alpha) ") "; 
    position: absolute; 
    left: -1.4em; 
} 

これは私のepubファイルでは正しく表示されません。それはこのように出てくる:

(a) Some text goes here. 
(b) More text here. 
(c) This line is longer. It goes on and on. And on some more. And then it 
keeps going until it wraps. 
(d) Another long line. This one will wrap too, once it gets to be long 
enough. You get the idea. The text should always line up while the 
list letters hang. 

は、それが最初の例と同じように動作させる方法はありますか?

答えて

0

「list-style-position:outside;」を追加してみてください。と "margin-left:2em;" li cssで。

ol.alpha_list { 
    counter-reset: item; 

} 

ol.alpha_list > li { 
    list-style: none; 
    position: relative; 
    list-style-position: outside; 
    margin-left: 2em; 
} 

ol.alpha_list li:before { 
    counter-increment: item; 
    content:"(" counter(item, lower-alpha) ") "; 
    position: absolute; 
    left: -1.4em; 
} 
+0

試していただきありがとうございますが、動作しませんでした。私はCaliberの本を編集していて、正しくレンダリングしています(私の元のCSSもそうでしたが)、iPhoneのMarvinで正しくレンダリングされません。しかし、iBooksとMarvinは同じHTMLレンダラーを使うと思っていたので、iBooksはうまくいくと思われます。 – jlocicero

+0

おっと!マーヴィンは「出版社のフォーマットに切り替える」という設定をしています。私がこれをするとき、それはマーヴィンで正しくレンダリングされます。再度、感謝します! – jlocicero

+0

ようこそ!お役に立てて嬉しいです – MrWitts