I have an SVG image that I’ve tried to attach to my page with HTML and CSS. However, it only appears as a very small image and only when I’ve inserted some additional text to the page. How can I make this bigger and also not reliant upon text being present? I’ve already tried manually increasing the size of the image in the code. Below are screenshot examples.
Topic summary
An SVG map image is displaying extremely small on a Shopify page and only appears when text is present. The user attempted to manually increase the image size in the code without success.
Root Cause Identified:
- The CSS property
position: absoluteapplied to the map was causing the sizing and visibility issues - Removing this property resolved the display problem
Resolution:
- Removing
position: absolutefrom the CSS fixed the image size - The map now displays at normal size regardless of text presence
Follow-up Issue:
- A jQuery-based infobox is positioning incorrectly—appearing far to the right instead of next to the cursor
- The user is seeking guidance on how to adjust the positioning to follow the cursor properly
Screenshots and code snippets were shared to illustrate both the original problem and the positioning issue.
@LEC - can you please share this page link?
Yes - https://353d6b-2.myshopify.com/pages/map-of-representatives
You’ll see a very tiny map next to the period. It’s strange, as when I remove the CSS the map returns to normal size. Adding CSS styling to the map makes it small and disappear when no text is present on the page.
I am also happy to share code if need be.
@LEC - in that css you have given position:absolute to the map, please remove that and check
That fixed it! Thank you for the help!
@LEC - welcome, do let me know if you need any more updates
I do have one last quick question, if you don’t mind.
The JQuery code I am using is for some reason not placing the infobox next to the cursor, but is instead placing it far to the right. How would I make it so that the info box is right next to the user’s cursor?
Here is the code block:


