Home > Software engineering >  bullet ( <ol> ) position goes down after changing line height
bullet ( <ol> ) position goes down after changing line height

Time:04-10

I have bullet list:

          <ol className="graphkregular mt-2" style={{ display: "listItem" }}>
            <li>
              <small>{popupData.content[0].split("\n").join("\n")}</small>
            </li>
            <li className='mt-2'>
              <small>{popupData.content[1].split("\n").join("\n")}</small>
            </li>
          </ol>

after changing line height and display bullets go down:

small {
  line-height: 1.4em;
  display: inline-block;
}

how to fix this:

enter image description here

CodePudding user response:

Try removing margin top from ol tag's classname

CodePudding user response:

Just remove display: inline-block; from small tag.

  • Related