[Update] I rephrased and got the perfect answer here
I do not see this as being a duplicate of the question mentioned above, for reasons given below
I want a kiosk display, where a single browser tab is how, full-screen (press F11).
I want a left and right column, with an SVG image in the centre.
Here is a minimal implementation:
<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<title>blah</title>
</head>
<body>
<table border="1" style="width: 90%; margin: auto">
<tr>
<td style="width:25%">
Left column
</td>
<td style="width:60%; border-width:1px; border-color:red;border-style: solid">
The SVG goes here, but is 1,300 lines
</td>
<td style="width:15%">
Right column
</td>
</tr>
</table>
</body>
as stated, the SVG is 1,300 lines, so I won't post it unless you really need it :-)
I believe that only the start is of interest, and that's what I can't seem to get right. How should my SVG
tag look to fill that table cell with the SVG, scaled to fit, maintaining the height / width ratio?
It currently is
<svg xmlns="http://www.w3.org/2000/svg"
width="7.22222in" height="10.0444in"
viewBox="0 0 650 904">
with the rest of the file being path
tags.
which is obviously wrong, as it has a fixed height / width. Note that I cannot foresee the screen size of the various kiosk devices.
[Update]
This question seems to imply that the viewBox must have a fixed size, rather than 100% - is that so?
Also, I have to inline the SVG
(I don't know if that makes a difference). I can't use an HTML img
tag because I am using AngularJs and some of my paths look like
<path id="Top row 1" ng-click='RoomClicked($event, "A-1")'
fill={{GetFillColour('A-1')}} stroke="black" stroke-width="1"
d="M 226.00,69.00
C 226.00,69.00 ...
and when I use an img
tag, the browser reports an error