You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#114093 style line-height in html

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Monday, 03 July 2023 15:34 BST

Koos
Dear Ryan,

The HTML style instruction/code <ol style="line-height: 140%;"> has no effect on the text presented in the editor nor on de website

See https://de-radio-amateur.nl/verwisselbare-radiospoel

What am I doing wrong??

Thanks, Koos

Ryan
140% doesn't seem to be enough. Try line-height: 2em; If you are trying to create space betweem list items, this is the wrong approach and you should use something like:

ol li {
    margin-bottom: 0.5em;
}
It would be best to add this to your template stylesheet as a css rule, which you can then apply as a Style to the ordered list, eg:

ol.list-space {}

ol.list-space li:nth-child(n+2) {
    margin-top: 0.5em;
}

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

Koos
Your code in the user css works :-)

Thank you Ryan

Only is W3 wrong??

https://www.w3schools.com/css/tryit.asp?filename=trycss_line-height

Ryan
Only is W3 wrong??

https://www.w3schools.com/css/tryit.asp?filename=trycss_line-height


No. The default line-height of your site is already set to 1.5 which is 150%.

Using line-height to create space between lists is not the best solution, and it is better to uses margin, as you have now done.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.