On Mon, 24 Jan 2005 11:23:00 -0000, mark | r <ma******@gmail.com> wrote:
i use document.getelementbyid('id').style.colour= a lot anyone
know how to set the style of the link in the following code
<li id="tab1"><a href="#">moo</a></li>
because setting the colour of tab1 doesnt work.
In theory it should, however user agents tend to treat link colours
specially.
If there's no whitespace between the start tags for the list item and
anchor elements, you could use
document.getElementById('tab1').firstChild.style.c olor = ...;
adding appropriate feature detection, of course.
Mike
--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.