I am very new to html and twitter bootstrap but guessing that there is a very simple fix that I am just missing. I have got 3 columns that consist of a radio button and 2 text columns the issue I am having is that there is no spacing between the 2 text columns but there is between the radio button and the first text field.
I have tried playing around with the row sizes “div class=”row-sm-4” but to no luck
<div class="col" style="overflow:auto;height:60vh;">
<div class="col-sm-12" style="max-height:10%;" ng-repeat="FoundAlises in SearchResults" ng-class="GetClassForSearchResult(FoundAlises)">
<div class="row mb-1">
<div class="col-sm-1 mt-12">
<input class="cursorPointer" type="radio" ng-model="$parent.SelectedSearchResult" ng-value="FoundAlises" name="AliasSearchResults" ng-click="OnSearchClicked(FoundAlises)">
</div>
<div class="row-sm-4">
<small class="cursorPointer" ng-click="OnSearchClicked(FoundAlises)">Alias : <small ng-bind="FoundAlises.Alias"></small></small>
<small class="cursorPointer" ng-click="OnSearchClicked(FoundAlises)">Tag : <small ng-bind="FoundAlises.Tag"></small></small>
</div>
</div>
</div>
The following is the area where I am having the issue
<div class="row-sm-4">
<small class="cursorPointer" ng-click="OnSearchClicked(FoundAlises)">Alias : <small ng-bind="FoundAlises.Alias"></small></small>
<small class="cursorPointer" ng-click="OnSearchClicked(FoundAlises)">Tag : <small ng-bind="FoundAlises.Tag"></small></small>
</div>
I expect the output to be all on one line and have equal spacing between all 3 columns. One thing to note but not sure if this will have any impact is results that are displayed can be different lengths of text. I was hoping that in these cases all of the text in the same column would be inline eg all of the ‘Alias :’ labels would be in line in 1 column and all of the ‘Tag :’ labels would be inline in the next column
Expected output
|Radio Button| Alias: ********** Tag:*******
|Radio Button| Alias: ************ Tag:*******
|Radio Button| Alias: ******* Tag:**********
Current Output
|Radio Button| Alias: ********** Tag:*******
|Radio Button| Alias: ************ Tag:*******
|Radio Button| Alias: ******* Tag:**********
2
Answers
I’ve made some changes to your code using bootstrap and inline styles by declaring element width as a percentage and using
display: inline-block;
to keep the rows on the same line, like so:Hopefully that helps. Let me know if that wasn’t what you are looking for.
This might helps you !