I am trying to make a html page in my angularjs application. I have a input box and one dropdown side by. My Input box has size and i want to make the dropdown expansion with same size as my input box.
My Html Code,
<body ng-controller="Controller">
<h1>Plunkr Example</h1>
<fieldset style="border:1px solid black;">
<legend>Data</legend>
<span style="float:right">Check4: <input type="input" id="input"
ng-repeat="x in string | filter : 'check'"
ng-model="x._text"/>
<select id="dropdown">
<option value="1">True</option>
<option value="2">False</option>
<option value="3">Edit</option>
</select>
</span>
</fieldset>
</body>
And Controller code,
$scope.string = [
{"_attributes":{"name":"comments"},"_text":"comments"},
{"_attributes":{"name":"check"},"_text":'Some Content Here'},
{"_attributes":{"name":"value"},"_text":123}
]
I also made a plunkr to demonstrate where the current layout is like this, with some gap between inputbox and dropdown. I tried to remove space by padding:0 and margin:0 but no success.
And what is want is,
And on click on dropdown the options should come beneath the input box with same size, like below
Also if user select True/false , the input box should become readonly. It should be editable only if the Edit option is selected.
Please suggest , how this can be achieved. Many thanks in advance.


