Page 1 of 1
baseline for ordered list
Posted: Mon Feb 05, 2024 1:31 pm
by Nina Esile
For the life of me, I can't figure out how to get the baseline of a numbered list to be the same for both the number and for the list text. You can see an example of what I don't want in the attached image. In the image the number is below the actual text for the list. Ideas?
Re: baseline for ordered list
Posted: Wed Feb 07, 2024 7:38 am
by trent the thief
Hi Nina,
If that's in the editor, ignore it. The output is true check of that alignment.
Re: baseline for ordered list
Posted: Wed Feb 07, 2024 10:47 am
by Nina Esile
Hi Trent,
Thanks for your answer.
Thing is, I showed a picture of the output. I have checked that *without* the <p> tags, the baseline is fine. If I include a <p> tag inside the list items <li>, I get a wonky baseline. Thing is, I can't find the source of the bad baseline. I have checked the "vertical alignment" and it's set to zero. There are probably a bunch of other places I should check as well, given that there are so many ways to do everything here!
Suggestions for what to check?
Nina
Re: baseline for ordered list
Posted: Fri Feb 09, 2024 2:27 pm
by trent the thief
I'm guessing that you have separate p and ol/li elements defined.
These will give you better control:
Code: Select all
/* affects all paragraph tags inside an li tag START */
ol > li p,
ul > li p
{
line-height: 13pt;
font-size: 11pt;
margin: 0 0 3pt 12pt;
}
/* affects all paragraph tags inside an li tag END */
I also use similar constructs for p and li elements in table cells:
Code: Select all
* td li - Keeps the Marker's font-size the same as the text's. li inherits 11pt from Body, otherwise. START */
td > ul > li > p
{
font-size: 10pt;
margin: 0 3pt 0 0 0;
}
td > ol > li > p
{
font-size: 10pt;
margin: 0 0 0 0;
}
td > ol > li > ol > li > p
{
font-size: 10pt;
margin: 0 0 0 0;
}
/* td li - Keeps the Marker's font-size the same as the text's. li inherits 11pt from Body, otherwise. END */
I updated those some months ago working on imports from Word and I think that the baseline offset issue was their reason, but can't be certain. Everything beyond two releases back may as well be prehistoric for what I remember.