Kod
<script type="text/javascript">
tab=[];
i=1;
while( tab.length<40 )
{
tab.push(i);
tab.push(i++);
}
for( i=0; i<40; i++ )
{
document.write("<div id="+tab[i]+" style='float:left;background-color:red;width:30px;border:solid 1px black;' >"+tab[i]+"</div>");
document.write(" ");
if( i == 9 || i == 19 || i == 29 || i == 39 )
{
document.write("<br>");
}
}
</script>
tab=[];
i=1;
while( tab.length<40 )
{
tab.push(i);
tab.push(i++);
}
for( i=0; i<40; i++ )
{
document.write("<div id="+tab[i]+" style='float:left;background-color:red;width:30px;border:solid 1px black;' >"+tab[i]+"</div>");
document.write(" ");
if( i == 9 || i == 19 || i == 29 || i == 39 )
{
document.write("<br>");
}
}
</script>
i problem pojawia sie gdy w stylach generowanego diva dalem border:solid 1px black. wszytsko sie rozjezdza. Natomias bez definicji border jest OK, div'y sa ladnie kolosiebie i pod soba