2
I have a line that is being lined up in the center as follows:
.row{
display: flex;
justify-content: center;
}
Inside this row has two columns, one with a select and the other with radio Buttons that appears as the option selected in select. I need radio Buttons to be next to the centralized select.
I tried something like:
<div class="row">
<div class="col-3">
<div class="select">
<select [(ngModel)]="controlaRadios" name="primeiroFiltroName" class="select-text">
<option hidden selected class="dropdown-item">Primeiro filtro</option>
<option value="1" class="dropdown-item">Todos</option>
<option value="2" class="dropdown-item">Tipo de anúncio</option>
</select>
<span class="select-highlight"></span>
<span class="select-bar"></span>
</div>
</div>
<div *ngIf="controlaRadios == 2" class="col-3">
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="defaultInline1" name="inlineDefaultRadiosExample">
<label class="custom-control-label" for="defaultInline1">Premium</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="defaultInline2" name="inlineDefaultRadiosExample">
<label class="custom-control-label" for="defaultInline2">Clássico</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" class="custom-control-input" id="defaultInline3" name="inlineDefaultRadiosExample">
<label class="custom-control-label" for="defaultInline3">Grátis</label>
</div>
</div>
</div>
My select appears aligned, but as soon as radios appear, the template is broken.
Stay like this:
How can I let the radios on the select side align?
I increased the col but still center the two here instead of appearing next to select. I use the material design bootstrap
– veroneseComS
using the speakers was the way I thought for the radio to be next to select... using in a Row, I couldn’t think of another way
– veroneseComS
@Renaotpls I thought you were using Bootstrap, until I reversed the edition I had made including the tags, I’m sorry! I’ll see if I can adjust the correct framework classes
– hugocsl
ok thank you!!!!
– veroneseComS
@Renaotpls just edited, now with the CDN of MD Bootstrap and left the way I think is most correct...
– hugocsl
I looked, but select is not centered. it should be centered and next to it the radio Buttons :/
– veroneseComS
so centralization is carried out in both select and radios
– veroneseComS
@Renaotpls The way you want just putting Uro in a
col
just... I’ll edit the answer again– hugocsl
@Renaotpls now yes edited answer
– hugocsl
If I set the column to 12, the input will occupy virtually my entire screen, visually it gets ugly. I guess there’s probably no simple way to do that, right?
– veroneseComS
@Renaotpls has yes, just you put a maximum width for your input, like
max-width:300px
for example, and you can still use the ruleMedia
to change this width on screens smaller than 566px. Or when you show the radios vc tb changes the width of the inputo, ai would be with JS, vc will have to evaluate– hugocsl
I got a result similar to what I needed
– veroneseComS