I would like to know how to put the red X button on top of the div
How are you?
HowIwantyoutostay:
Currentlytheclassofmybuttonislikethis:
position:absolute;top:9%;right:2%;
Whenputtingthisclass:
top:-9%;right:2%;width:24px;height:24px;background-color:#f00;position:absolute;z-index:9;border-radius:10px;
thishappens:
CSSCODE:
.janela{margin-top:1000px;margin-left:40%;position:absolute;max-height:200px;min-width:40%;z-index:1;overflow-y:auto;background-color:rgba(190,190,190,0.6);}.btnclose{/*position:absolute;*/top:-9%;right:2%;width:24px;height:24px;background-color:#f00;position:absolute;z-index:2;border-radius:10px;}
HTMLCODE
<divclass="col-md-5 col-md-offset-3 janela" id="divDataJson"></div>
JS CODE
$('#divDataJson').append(
"<div class'row' id='btns"+i+"' style='margin-top: 10px; margin-bottom: 15px;' >" +
"<div class='col-md-2'>"+
"<button type='button' class='btn btn-primary thbtn' onclick='add(\""+retorno[i][0]+"\")'><b><span class='glyphicon glyphicon-plus-sign'></span></b></button>"+
//"<button type='button' onclick='esconder(\"camada\","+numero_de_camadas+","+i+",\"btns"+i+"\",\"null\")' class='btn btn-success thbtn' ><b><span class='glyphicon glyphicon-chevron-down'></span></button></b>"+
"</div>"+
"<div class='col-md-10'style='text-align:left;' onclick='esconder(\"camada\","+numero_de_camadas+","+i+",\"btns"+i+"\",\"null\")'>"+
"<p>      "+
"<img src='img/sistema3.png' width='26' height='26' />" +
"<b> "+retorno[i][0]+" </b>"+
"</p>"+
"</div>"+
"</div>");