Unwanted horizontal margin using dbc.container

Something has changed with an update over the past couple months where I have a few pixels of margin space on the left and right sides of my browser using dbc.Container:

without setting fluid=True this is much wider, as probably intended. Does anyone know the trick on using dbc.Container and getting your page to span from edge to edge horizontally?

Hi, you could try setting the margin to 0 via the style parameter.

I noticed that the doc.Row() also has some default margins which provoke a horizontal scroll bar if using a container with fluid=true.

I set these margins to 0.

2 Likes

Thanks @AIMPED

Actually setting padding to 0 fixed it.

        return dbc.Container([
            # my junk
            page_container
        ], style={'padding': 0}, fluid=True)
1 Like