0
I’m not getting my line Labels and reduce vertical spacings between Labels and the inputs. Some are adjusting and some are not. I would like to reduce the vertical/horizontal spacing that distances the fields to better take advantage of the screen space. Someone knows how to help me?
css
input[type=text] {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
/*border: 1px solid #555;*/
outline: none;
}
input[type=text]:focus {
background-color: lightblue;
color:black;
}
html
<div class="form-horizontal">
<div class="form-group row">
<div class="col-md-2">
<label class="control-label">Natureza</label>
<select id="pessoaNatureza" data-modal="" data-plugin="selectpicker" title="Selecione uma opção" class="form-control show-tick show-menu-arrow"></select>
<span class="text-danger"></span>
</div>
<div class="col-md-4">
<label control-label">Data de Inclusão</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="icon wb-calendar" aria-hidden="true"></i>
</span>
</div>
<input id="txtDataInclusao" class="form-control" data-multidate="true" data-plugin="datepicker" disabled />
</div>
<span class="text-danger"></span>
</div>
</div>
<div class="form-group row">
<div class="col-md-6">
<label control-label">Razão Social</label>
<input class="form-control text-uppercase" />
<span class="text-danger"></span>
</div>
<div class="col-md-6">
<label control-label">Nome Fantasia</label>
<input class="form-control text-uppercase" />
<span class="text-danger"></span>
</div>
</div>
<div class="form-group row">
<div class="col-md-4">
<label control-label">Abertura</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="icon wb-calendar" aria-hidden="true"></i>
</span>
</div>
<input id="txtDataAbertura" class="form-control" data-multidate="true" data-plugin="datepicker" />
</div>
<span class="text-danger"></span>
</div>
<div class="col-md-5">
<label class="control-label">Regime Tributário</label>
<select data-plugin="selectpicker" title="Selecione uma opção" class="form-control selectClass show-tick show-menu-arrow"></select>
<span class="text-danger"></span>
</div>
</div>
Currently my screen is like this:
And by removing the spacing, I’d like to get a result like this:
Running your snippet doesn’t look like the image, you can edit and make it replicate the image’s behavior, otherwise it becomes difficult to help
– Ricardo Pontual
As Ricardo commented, just use the snippet when it makes sense to use. You had already been guided in the question you deleted. The snippet are for full examples ([mcve]), not to post random codes that don’t have to be executed.
– Woss