I am eager to create a diagram on my website using SVG. To ensure the diagram is displayed in full screen, I am utilizing availHeight
and availWidth
to determine the client screen's height and width, then adjust the scaling accordingly.
My current screen resolution is 1920 *1080.
For experimentation purposes, I started by drawing a line:
<svg height="500" width="1920">
<line x1="0" y1="50" x2="1900" y2="50" style="stroke:rgb(255,0,0);" />
</svg>
The issue I'm facing is that in Chrome, the line exceeds the screen boundaries and displays a scrollbar, whereas in Firefox, it fits perfectly within the screen. I aim to achieve consistent output on both browsers.
I kindly ask for your assistance.