'I'm having great difficulty positioning SVG Circle Divs in Rectangular Divs in my HTML.
I'm hoping someone can point me in the right direction.
I'm also using JS to respond to clicks in those Divs (But that's not yet a problem)
so I've commented out the JS link.
I should also say that currently I can only get a display in Opera and Safari.
I originally had it in Firefox, IE and Chrome also. I've no idea what went wrong.
This is a cut-down version of the HTML
Code: Select all
<!DOCTYPE.html"codebox">Code: Select all
body
{ margin: 0; border: 0; }
h1
{ font-size: 1.2em;
text-align: center; }
p
{ font-size: 0.9em;
text-align: center; }
#wrap
{ position: absolute;
top: 10px; left: 10px;
width: 710px; height: 500px;
border: 3px solid #000;
background: rgb(221,221,221); color: #000; }
#orig
{ position: absolute;
top: 20px; left: 20px;
width: 150px; height: 220px;border: 1px solid #000;
background: rgb(254,220,186); color: #000; }
#prev
{ position: absolute;
top: 260px; left: 20px;
width: 150px; height: 220px;
border: 1px solid #000;
background: rgb(249,232,215); color: #000; }
#curr
{ position: absolute;
top: 20px; left: 190px;
width: 290px; height: 460px;
border: 2px solid #000;
background: rgb(170,170,170); color: #000; }
#buts
{ position: absolute;
top: 20px; left: 500px;
width: 190px; height: 460px;
border: 1px solid #000;
background: rgb(204,204,204); color: #000; }
#reds
{ position: absolute;
top: 45px; left: 10px;
width: 50px; height: 405px;
background: #fff;
border: 1px solid #f00; }
#grns
{ position: absolute;
top: 45px; left: 70px;
width: 50px; height: 405px;
background: #fff;
border: 1px solid #0f0; }
#blus
{ position: absolute;
top: 45px; left: 130px;
width: 50px; height: 405px;
background: #fff;
border: 1px solid #00f; }
#reds.p4
{ position: absolute;
width: 31px; height: 31px;
top: 90px; left: 20px; }
#reds.cr
{ position: absolute;
width: 41px; height: 41px;
top: 180px; left: 15px; }
#reds.m4
{ position: absolute;
width: 31px; height: 31px;
top: 270px; left: 20px; }
#reds.cr
{ background: #800000; }
.cr svg:circle,
.p4 svg:circle,
.m4 svg:circle
{ position: relative;
cy: 22px; cx: 25px; }
.cr svg:text
{ position: absolute;
y: 28px; x: 14px; }
.p4 svg:text, .m4 svg:text
{ position: absolute;
y: 28px; x: 17px; }
#orig.text
{ position: absolute;
top: 35px; left: 10px; }
#orig.p
{ position: absolute;
top: 50px; left: 10px; }