J'ai un soucit pour pouvoir fixer un DIV en (position:absolute).
Au démarrage j'appose le div avec des coordonnées X Y selon la taille de la fenêtre. Seulement lorsqu'on redimensionne cette dernière le DIV reste sur place !!!! Je souhaiterai que le DIV suive avec le reste !
Voici un petit résumé du problème :
<body>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<tr>
<td width="25%"> </td>
<td width="25%"> </td>
<td width="25%"> </td>
<td width="25%"> </td>
</tr>
<tr>
<td width="25%"> </td>
<td width="25%"> </td>
<td width="25%">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="100%" id="ScriptIci"></td>
</tr>
</table>
</td>
<td width="25%"> </td>
</tr>
<tr>
<td width="25%"> </td>
<td width="25%"> </td>
<td width="25%"> </td>
<td width="25%"> </td>
</tr>
</table>
<script>
sPosition = function(inID, inTYPE){
var iVal = 0;
var oObj = document.getElementById(inID);
var sType = 'oObj.offset' + inTYPE;
while (oObj && oObj.tagName != 'BODY') {
iVal += eval(sType);
oObj = oObj.offsetParent;
}
return iVal;
}
var _CoordY = sPosition('ScriptIci', 'Top')
var _CoordX = sPosition('ScriptIci', 'Left')
window.document.write("<div id='ScriptIci' style='position:absolute;left:"+_CoordX+"px;top:"+_CoordY+"px; width:200px; height:300px; font-size:10pt; line-height:10pt;'>Salut</div>");
</script>
</body>