Quote:
Originally Posted by RbnJrg
I think you wouldn't need javascript to do what you want. You are using (under "preserveAspectRatio" property the value ""xMidYMid slice". You should change it for "xMidYMid meet". After that, erase the code for <rect> and instead, use the property "border". For example, try with this:
Code:
<body style="margin:0; padding:0">
<div style="text-align: center; padding: 0pt; margin: 0pt;">
<svg xmlns="http://www.w3.org/2000/svg" height="95%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 600 900" width="100%" style="border: 10px solid black" xmlns:xlink="http://www.w3.org/1999/xlink">
</svg>
</div>
</body>
Regards
Rubén
|
Thank you for the suggestion, but it is not working: the svg image goes outside the page...