You're right using div.container-fluid
and you also need a div.row
child. Then, the content must be placed inside without any grid columns.
If you have a look at the docs you can find this text:
- Rows must be placed within a .container (fixed-width) or .container-fluid (full-width) for proper alignment and padding.
- Use rows to create horizontal groups of columns.
Not using grid columns it's ok as stated here:
- Content should be placed within columns, and only columns may be immediate children of rows.
And looking at this example, you can read this text:
Full width, single column: No grid classes are necessary for full-width elements.
Here's a live example showing some elements using the correct layout. This way you don't need any custom CSS or hack.