i have a below code. i need to position the div elements.
<div id="outer" style="width:300px">
<canvas></canvas>
<div id="inner">
<div class="a"> val1 </div>
<div class="a"> val2 </div>
<div class="a"> val3 </div>
<div class="a">val4</div>
</div>
</div>
.a{
'overflow': 'hidden',
'text-overflow': 'ellipsis',
'white-space': 'nowrap'
}
I need to position the innerdiv around the canvas element. suppose if i give the position bottom the comes under the canvas element and should be horizontally center aligned. if i give the position right the inner div should be right of the canvas and it should be vertically center aligned.i am giving the attribute position to the script. i tried a lot in JavaScript through CSS. Suppose if no space in the outer div the inner div text need to shrink with ...(dots)..please help me..