I have some layouting that needs different padding for a div container of class "row". For example like that
<div class="row row-no-padding">
<div class="col-md7">
test content
</div>
<div class="col-md5">
<div class="row">
<div class="col-sm-6">
<div class="form-group form-group-default">
{!! Form::label('ticket_reference', 'Ticket Referenz') !!}
{!! Form::text('ticket_reference', null, ['class' => 'form-control']) !!}
</div>
</div>
<div class="col-sm-6">
<div class="form-group form-group-default">
{!! Form::label('eldis_reference', 'ELDIS Referenz') !!}
{!! Form::text('eldis_reference', null, ['class' => 'form-control']) !!}
</div>
</div>
</div>
</div>
</div>
That works so far, but I would like to achieve a different padding for each row. The outer row should have no padding at all. So I added a class "row-no-padding" to it like this:
.row-no-padding {
[class*="col-"] {
padding-left: 0 !important;
padding-right: 0 !important;
}
}
But this is inherited to the row used inside the form where I would like to have a different padding. How do I need to do this?
[class*="col-"]? it will work without it, if you want a row to have no padding simply add therow-no-paddingclass to it..rowclass values to run over the initial values that comes frombootstrap.css.row { padding-left: 0; padding-right: 0; }