As the title described, I can't set the style of a input[type="text"] element to display: inline.
After I apply the styles, it still behaves like display: inline-block
I tried the codes below.
.box {
border: 2px solid black;
padding: 5px;
margin: 15px;
}
.inline {
border: 2px solid rebeccapurple;
padding: 10px;
display: inline;
}
<body>
<div class="box">
<input class="inline" type="text" name="" id="" value="input">
</div>
<div class="box">
<span class="inline">span</span>
</div>
</body>
Display on Edge:
Display on Chrome:
I google this question but get nothing.
I've check the dev tools (in Edge), it shows the input[type="text"] element actually has the display: inline property as its style.
but it just display as a inline-block element, and not behaved like the span (which behaved like a inline element).



