I need to put two selects
within the same div
, one aligned to the left, and the other to the right.
I've tried using CSS to create a class to apply to every select
, but it did not work:
select.left {
text-align: left;
}
select.right {
text-align: right;
}
I'm using the twitter-bootstrap + Flat-ui
, then I've created the verifiable example below and FIDDLE with these libraries:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><scriptsrc="http://designmodo.github.io/Flat-UI/docs/assets/js/application.js"></script>
<link href="http://designmodo.github.io/Flat-UI/dist/css/flat-ui.min.css" rel="stylesheet"/>
<script src="http://designmodo.github.io/Flat-UI/dist/js/flat-ui.min.js"></script><scriptsrc="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet"/>
<div class="col-md-8">
<label class="control-label" for="cest"> Estado:
<br/>
<select name="Test" id="cest" class="select select-primary select-exemploa right" data-toggle="select"></select>
</label>
<label class="control-label" for="Ccid"> Cidade:
<br/>
<select class="select select-primary select-exemploa left" name="Tcid" id="Ccid" data-toggle="select"></select>
</label>
</div>
Note: they have to stay in the same div
because otherwise the script that populates the selects
does not find the city after it has chosen the state. Here you have a fiddle with the plugin .