I have a very simple mapbox installed on my website. For whatever reason, it is it is only displaying roughly 50% of the map. I don't know if this is a webkit issue or something is wrong with my styling.
this is whats in my index.html file:
<div id="map" class="map">
<script>
mapboxgl.accessToken =
"pk.eyJ1IjoiYnJhbmF1c3QiLCJhIjoiY2thZzlvMWJrMDVpNDJwbWprcjZuOWs0ZSJ9.fhHUkmUo3OFZpv74nmsqeA";
var map = new mapboxgl.Map({
container: "map",
style: "mapbox://styles/branaust/ckah0ufz017b71jrsp5pm2w0d",
});
map.resize()
</script>
</div>
and here is my styling:
#map {
display: flex;
grid-row: 1 / 2;
grid-column: 1 / 2;
height: 100%;
width: 100%;
}
Here is a picture of what im seeing:

It's strange because when I resize the browser window, the map then fills the div element, but when I first load the webpage it only displays half?