diff --git a/frontend/src/main.ts b/frontend/src/main.ts index 930a32b..479cce7 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -69,8 +69,8 @@ function displayZipCode( const position = convertCoordinateToPixels(center, mapSize); const rect = document.getElementById("map")!.getBoundingClientRect(); dot.style.display = "block"; - dot.style.left = (position.x + rect.left) + "px"; - dot.style.top = (position.y + rect.top) + "px"; + dot.style.left = position.x + rect.left + "px"; + dot.style.top = position.y + rect.top + document.documentElement.scrollTop + "px"; } function setupMap( diff --git a/frontend/style.css b/frontend/style.css index 510377c..6358dbe 100644 --- a/frontend/style.css +++ b/frontend/style.css @@ -187,7 +187,7 @@ code { border: 2px solid black; background-color: var(--brand); filter: drop-shadow(1px 1px 2px black); - position: fixed; + position: absolute; display: none; }