PDA

View Full Version : How to color this layer?


kippie
08-07-2003, 07:51 AM
In the HTML below I would like to color the the background of the 2 divs, for example one in red and the other in blue. Could someone tell me how I can do this?

This is the HTML:
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
</head>
<body>

<DIV ID="layerToMove" STYLE="position:absolute; clip:rect(0,131,128,0)">
<div ID="Handle" STYLE="position:absolute; left:45; top:3; clip:rect(0,88,28,0)">
</div>
</div>

</body>
</html>

petervazed
08-07-2003, 09:17 AM
In line style or add it in the css.

<DIV ID="layerToMove" STYLE="position:absolute; clip:rect(0,131,128,0);background-color: #669999;">

:rocker:

Vincent Puglia
08-07-2003, 11:19 AM
Hi,

dependent upon the browser:


document.all['layerToMove'].style.backgroundColor = '#999222'
document.getElementById('Handle').style.backgroundColor = '#669999';

if interested, see the dHTML scripts/tutorials at my site (GrassBlade)

Vinny

kippie
08-07-2003, 02:50 PM
Thanks

Kippie