I am currently working with bootstrap 4 and have a layout that includes a container
class:
body
#content.container
.row
.col-6
| Great content
.col-6
| I really like it
.row
.col-12 And so forth
.row
.col-3.here Content with an image
.row
.col-12 And so forth
Everything is functioning as expected, until my designer adds an image positioned to the left of the screen at the level of the .here
class, which places it outside the .container
.
The current workaround involves moving the .container
outside the layout and repeating it. It's not ideal because it breaks factoring, violates DRY principles, and affects responsiveness.
Is there any other solution?
Setting the image position in JS is messy and fixing the image position isn't viable either.
I was thinking maybe using flexboxes could provide a cleaner solution, something like
div.uncontainer style="background-image: url('/images/example')"
, which would make the div full width while ignoring the .container
constraint.
Has anyone else encountered this issue? Any suggestions for a clean solution?
Thank you