Extend elements in Bootstrap grid to the viewport edge

I have a bootstrap 4 grid with a fixed .container div (not .container-fluid), and I’m trying to extend the content of a column to the edge of the viewport (left or right), as in the attached image, keeping the other side aligned with the column opposite border. The column is not 50% of the container (otherwise the solution is simple). And I can’t use a pseudo element because I need that te content of the div reach the viewport border.

Do you have any suggestion?

Expected result

the problem is the same described in Bootstrap 4: Make an object inside of a container column extend to the viewport edge , but the proposed solution uses javascript and I’m looking for a css only method.

Asked on July 16, 2020 in CSS.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.