Does the input inside with the display unit look not very good, why?

When I put input

c type=text

into an element li

with display:block

I get weird results? Here's an example:

    <li><input type="text" value="withvalue" style="display: block" /></li>
    <li><input type="text" style="display: block" /></li>


For the former, input

I can only see the bullet when input

focused, but inside input

. For the second, input

it is not on the same line as the parent mark li


Can someone explain this and can suggest a fix?



source to share

2 answers


<li style = "display:inline;"> ... </li>




try without style = "display: block"

    <li><input type="text" value="withvalue" /></li>
    <li><input type="text" /></li>




All Articles