Reading the commentaries of your question, why not use the class container-fluid and create a custom class that helps to limit and center the container-fluid element when the width of the screen is greater than the specified (1170px in your case). For example, with a code like this:
HTML
<div class="container-fluid custom-class">
<div class="row">
<div class="col-md-6" style="background-color:red; min-height:100px;">
sample
</div>
<div class="col-md-6" style="background-color:yellow; min-height:100px;">
sample
</div>
</div>
</div>
CSS
.custom-class {
max-width: 1170px;
margin: 0 auto;
}
Example:
You can play with the width resize on the next example, and check if this is what you are expecting. On this example, max-width was decremented to 900px so you can visualize how it works.
https://jsfiddle.net/8bz97a1u/1/
UPDATE:
Here you have a new example with full-width background (that have two colors) and an inner html with fixed max-width (of 900px in the example):
HTML
<div class="container-fluid custom-background">
<div class="row fixed-max-width">
<div class="col-md-6 border border-primary" style="min-height:100px;">
sample
</div>
<div class="col-md-6 border border-primary" style="min-height:100px;">
sample
</div>
</div>
</div>
CSS
.fixed-max-width {
max-width: 900px; /* Example, but you can replace by the value you need */
margin: 0 auto;
}
.custom-background {
background: linear-gradient(90deg, red 50%, yellow 50%);
}
LIVE EXAMPLE
https://jsfiddle.net/8bz97a1u/2/