Quote:
Originally Posted by RbnJrg
You can achieve that effect with the following code:
|
Of course! Right when I saw negative margins in your post, the same type of solution clicked for me (I hate it when that happens).
Thanks for the fantastic example.
I only did a few minor tweaks to your CSS:
- Uncondensed margins.
- Made the width 25% (adjusted margins to fit)
- 5% was a little too thin when I used "VIII"
- Removed specifying "black" from the border-top
- This should allow the line to match the user specified font color
- Tested it by changing the font color in Calibre, looked like the line color changed right along with it
Code:
h2 {
text-align: center;
margin-top: 1em;
margin-bottom: 1em;
margin-left: 0;
margin-right: 0;
border-top: 3px solid;
height: 0.5em;
}
.text {
float: left;
width: 25%;
margin-top: -.5em;
margin-bottom: 0;
margin-left: 37.5%;
margin-right: 37.5%;
background: white !important;
}
p {
text-align: justify;
text-indent: 0em;
}
(See attached EPUB)
In ADE:
Tested it in Calibre, you get this oddity (border appears at the very top, and not through the middle):
Quote:
Originally Posted by RbnJrg
Here you can see how it looks in ADE:
|
JPG?!?!?!?! You disappoint me! Have I taught you nothing about the superiority of PNG for artificial images?!!?!?
Quote:
Originally Posted by GrannyGrump
@RbnJrg -- but won't that look odd if the user does not have Black Text on a White Background?
|
Indeed... doesn't seem like there would be a perfect solution, but this is a fantastic step in the right direction.
Definitely much further than where I was previously!
Quote:
Originally Posted by GrannyGrump
@Tex -- if you want to go through the hassle of an embedded font, freeware Type Light [ http://www.cr8software.net/typelight.html -- it says "open type font editor", but also works with true type] is fairly simple to use to edit/replace glyphs. You could make the emdash longer, and embed that subsetted font. Just a thought.
|
Thanks for the info. I personally tend to just err on the side of never getting in the way of user font choices, so I try to avoid embedding any fonts.
I will put this one in my pocket and take a look though.
Quote:
Originally Posted by gbm
Remember that the Nook does not like condensed margins
Please see this thread, Post #13-#21. Nook does not like condensed margins when not using publisher defaults.
|
Thanks for pointing this out. Good to let others learn about oddities in certain readers.
I always use the uncondensed version anyway, seems much easier to understand/read (especially if others open the book and want to quickly tweak something).