Search code examples
javascripthtmlcssreactjsstyles

Button will not go on the same line as list-item text


I have a unordered list with list items. Each list item has a button. The button does not seem to be able to go on the same line as the li-text -- this seems to be due to the li element having a default display of list-item. The problem with changing this display in the CSS is that if I change the display of list-item to be inline, the whole list messes up its formatting and the li::marker seems to disappear.

Does anyone know how to circumvent li-text to let a button sit next to it?


Solution

  • what's the problem?

    <ul>
    <li>some item <button>press</button></li>
    </ul>