Any ideas how to do this? I created this script http://jsfiddle.net/matusko/2pctr9ok/3/ , and all I want to do is that the input behaves the same as the top divs.
CSS
.left {
float:left;
width:180px;
background-color:#ff0000;
}
.right {
width: 100%;
background-color:#00FF00;
display: block;
}
HTML:
<div>
<div class="left">
left
</div>
<div class="right">
right
</div>
</div>
<br/>
<div>
<div class="left">
left
</div>
<input type="text" placeholder="right" class="right"/>
</div>
I don’t understand why the input does not behave like a div, even if the decency inspector says that its display is a block.
source
share