CSS: Display input and div next to eachother (left: dynamic, right: fixed size)
by admin on Jan.03, 2017, under Programming
Result:
divB
HTML Code
<div id="container"> <div id="divB">divB</div> <div id="divA"> <input type="text" style="width: 100%" placeholder="this is the default text of this textbox" /> </div> </div>
CSS Code
#divB { border:1px solid red; float:right; width: 100px; } #divA { border: 1px solid aqua; overflow: hidden; padding-right: .5em; }