Le 9/27/08 2:24 AM, html a écrit :
Hello all,
I need to change the colour of my text. For the paragraph I do
document.fgColor ="blue" ;
prefer
JS :
document.getElementById('P_1').style.background = 'skyblue';
HTML :
<p id="P_1"blah </p>
but how do I do this for the select tags?
<select style="background: orange">
<option>100
<option>200
<option style="background: yellow">300
<option>400
</select>
...and I prefer it to apply to all select tags
<style type="text/css">
select { background: yellow; border: 2px solid orange; }
option { background: #ffc }
p { background: #ddd; }
#P_1 { background: azure; color: blue; text-align: justify }
</style>
<p>
<select>
<option>100
<option>200
<option style="background: yellow">300
<option>400
</select>
</p>
<p id="P_1"re blah </p>
<http://www.w3.org/TR/CSS21/indexlist.html>
--
sm