xorg1990
New member
Hi, dieses css treibt mich noch in den Wahnsinn.
Habe mehrere canvas, die in den div's dargestellt werden sollen wie im HTML Dom.
diese 2 canvas
sind alle außerhalb von <div id="centerBank">
Und dadurch kommt alles durcheinander. canvas "left" soll in <div id="centerBank"> links steh und canvas "right", rechts.
*die canvases werden später dynamisch erzeugt deswegen das unhübsche inline css.
Habe mehrere canvas, die in den div's dargestellt werden sollen wie im HTML Dom.
Code:
<!DOCTYPE html>
<html>
<head>
<title>test</title>
<style type="text/css">
#rahmen{
width: 100%
height: 100%
}
#mainVolume{
margin: 5px;
}
#leftBank{
float: left;
border: 1px solid black;
width: 350px;
height: 1000px;
}
#rightBank{
float: right;
border: 1px solid black;
width: 350px;
height: 1000px;
}
#center_LFE{
width: 650px;
height: auto;
margin: 0 auto;
}
#centerBank{
border: 1px solid black;
width: 100%;
height: 161px;
}
#left{
margin-left: 8px;
float: left;
}
#right{
margin-right: 8px;
float: right;
}
#center{
margin-left: 5px;
float: right;
}
#LFE{
float: left;
margin-right: 5px;
}
#leftSourroundBack{
margin-left: 8px;
float: left;
}
#rightSourroundBack{
margin-right: 8px;
float: right;
}
#leftSourround{
margin-left: 8px;
float: left;
}
#rightSourround{
margin-right: 8px;
float: right;
}
</style>
</head>
<body onload="run()">
<div id="rahmen">
<div id="centerBank">
<div id="center_LFE">
<canvas style="background-color: rgba(51, 51, 51, 0.4); width=320; height=160;" id="LFE" width="320" height="160"></canvas>
<canvas style="background-color: rgba(51, 51, 51, 0.4); width=320; height=160;" id="center" width="320" height="160"></canvas>
</div>
<canvas style="background-color: rgba(51, 51, 51, 0.4); width=320; height=160;" id="left" width="320" height="160"></canvas>
<canvas style="background-color: rgba(51, 51, 51, 0.4); width=320; height=160;" id="right" width="320" height="160"></canvas>
</div>
<div id="leftBank">
<canvas style="background-color: rgba(51, 51, 51, 0.4); width=320; height=160;" id="leftSourroundBack" width="320" height="160"></canvas>
<canvas style="background-color: rgba(51, 51, 51, 0.4); width=320; height=160;" id="rightSourround" width="320" height="160"></canvas>
</div>
<div id="rightBank">
<canvas style="background-color: rgba(51, 51, 51, 0.4); width=320; height=160" id="rightSourroundBack" width="320" height="160"></canvas>
<canvas style="background-color: rgba(51, 51, 51, 0.4); width=320; height=160;" id="rightSourround" width="320" height="160"></canvas>
</div>
<div class="block center">
<div id="mainVolume">Volume Here</div>
</div>
</div>
</body>
</html>
diese 2 canvas
<canvas style="background-color: rgba(51, 51, 51, 0.4); width=320; height=160;" id="left" width="320" height="160"></canvas>
<canvas style="background-color: rgba(51, 51, 51, 0.4); width=320; height=160;" id="right" width="320" height="160"></canvas>
sind alle außerhalb von <div id="centerBank">
Und dadurch kommt alles durcheinander. canvas "left" soll in <div id="centerBank"> links steh und canvas "right", rechts.
*die canvases werden später dynamisch erzeugt deswegen das unhübsche inline css.