View Full Version : <ul> and <li> is not consistently spacing


LostSock
03-14-2012, 09:02 AM
This has been plaguing me on more than a few books, but this book has a LOT of lists and I don't want to use a slapjack fix for it. I'm not sure if this has happened to anyone else, but it's frustrating me.

I have this in my book, in several spots:

<p class="subheadafter">Seasonal</p>

<ul>
<li>Information here.</li>

with this for subheadafter (I have not changed the li or ul parameters):

.subheadafter {
font-size: 1.10em;
font-style: italic;
margin-top: 1em;
text-indent: 0em;
}


What that produces in an ereader is some instances in which there is approx. 1em of space between 'Seasons' and the first item of the list. In other cases though, it's one line right after the other, with no space at all. Why on earth is that happening? It's the exact same code, and there's no unclosed ul preceding it. Does anyone have any ideas?

Thanks in advanced!

Jellby
03-14-2012, 10:49 AM
Is the class of the element before the list always "subheadafter"? Does the list sometimes have a class? Is it always <ul>? Are all cases within the same XHTML file?

Have you validated the XHTML and CSS codes? Have you tried in different readers or in a browser?

LostSock
03-14-2012, 10:56 AM
Sometimes it's after a regular paragraph, but it doesn't show spacing there either. Passed all XHTML and CSS checks, and with every XHTML file (14) in the epub. It happens with both <ul> and <ol>

I didn't think to try a browser, but in Safari and Firefox it does show the spacing properly. So, is this an issue with ADE then?

Jellby
03-14-2012, 11:58 AM
Maybe. Can we see a full sample (a compliant ePub that displays the problem)?

LostSock
03-14-2012, 01:19 PM
Unfortunately, I can't upload it. But I did manage to get a fix of sorts working. I added this to my CSS:

#main ul {
list-style-type:circle;
margin: 1em 0 0 1em;}
#main2 ol {
list-style-type:decimal;
margin: 1em 0 0 1em;}
#main li {
list-style-type:circle;
margin : 1.5em 0 0 0;
padding: 0 0 0.75em 0;
}
#main2 li {
list-style-type:decimal;
margin : 1.5em 0 0 0;
padding: 0 0 0.75em 0;
}

and tagged with the proper IDs.


Thank you for trying to help!