Skip to content

Making width 100% so it fills space in responsive screen size #77

@ejntaylor

Description

@ejntaylor

On smaller screens the container increases in size, but the map does not.

It seems the map canvas width and height is generated and injected into the dom element.

eg.
<canvas class="mapboxgl-canvas" tabindex="0" aria-label="Map" width="400" height="257" style="width: 400px; height: 257px;"></canvas>

I am unable to override the width with css.

Any ideas how I can make the map canvas expand to fill the parent container.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions