I think this is what I'm trying to do.
Vertically Aligning SVG In The Middle
This is exactly how I want it to look, but the viewbox gets positioned in all different locations after putting the code in.
This is exactly how I want the viewbox to be positioned.
It's 'Not' positioned in the middle on jsfiddle
https://jsfiddle.net/depuqx0p/
But it's positioned in the middle on CSSDESK
It's 'Not' positioned in the middle on jsbin
https://jsbin.com/majeyiboto/edit?html,output
But it's positioned in the middle on w3schools
https://www.w3schools.com/code/tryit.asp?filename=FKJGG1IEB6TN
It's 'Not' positioned in the middle on Stack Overflow
And I'm trying to put it in the middle on Blogger, where its shown it's 'Not' positioned in the middle.
Blogger
https://testpage34567.blogspot.com/
It also seems to be positioned differently in all browsers.
What can I do/implement to fix/resolve the issue?
I mainly want to put it on blogger, but I don't know what I can do to fix the issue, and don't know what's causing the issue.
Code:
<button id="playButton2" style="display:block;width: 606px;height:50px;border-radius:50px;background-image: linear-gradient( to right,#000000 198px,#0059dd 198px, #0059dd 201px, #000000 201px, #000000 399px, #0059dd 399px, #0059dd 402px, #000000 402px );border: 3px solid #0059dd; cursor: pointer;color:#000000;" onclick="
var button = document.getElementById('playButton2');
var player = document.getElementById('player2');
document.querySelector('#playButton2 .initial').style.display='none';
document.querySelector('#playButton2 .pause').style.display='none';
document.querySelector('#playButton2 .play').style.display='none';
player.volume=1.0; if (player.paused) {
document.querySelector('#playButton2 .pause').style.display='inline-block';
playButton2.style.background = 'linear-gradient( to right, #00ffff 198px,#0059dd 198px, #0059dd 201px, #ffffff 201px, #ffffff 399px, #0059dd 399px, #0059dd 402px, #ff00ff 402px )';
player.play();
} else {
document.querySelector('#playButton2 .play').style.display='inline-block';
playButton2.style.background = 'linear-gradient( to right, #000000 198px,#0059dd 198px, #0059dd 201px, #000000 21px, #000000 399px, #0059dd 399px, #0059dd 402px, #000000 402px )';
player.pause();
}">
<svg style="display: none;background-color: red;" class="play" width="39" height="40" viewBox="5 8 50 56">
</svg>
<svg style="display: none;background-color: red;" class="pause" width="39" height="40" viewBox="0 -3.4 24 24">
</svg>
<svg class="initial" width="39" height="40" style="background-color: red;" viewbox="5 8 50 56">
</svg>
</button>
<audio id="player2" style="display:none;">
<source src='' type='audio/mpeg'></source>
</audio>