Thanks in advance,
<html>
<head><title>Search Engines</title>
<style type="text/css">
body {
background-color: silver;
}
</style>
</head>
<body >
<a href="http://www.google.com" onMouseOver="document.bgColor='yellow';
"return true;">Google</A>
<a href="http://www.altavisa.com" onMouseOver="document.bgColor='green';
"return true;">AltaVista</A>
</body>
</html>
<html>
<head><title>Search Engines</title>
<script language=vbscript>
Sub Bg(Stl)
document.all.somebody.bgcolor = Stl
End Sub
</script>
</head>
<body id=somebody bgcolor=silver>
<a href="http://www.google.com" onMouseOver='Bg "yellow" ' onMouseOut='Bg
"silver"' >Google</A>
<a href="http://www.altavisa.com" onMouseOver='Bg "green"' onMouseOut='Bg
"silver"'>AltaVista</A>
</body>
</html>
"Susan K Goben" <skg...@cccn.net> wrote in message
news:OaMXuBIfCHA.2192@tkmsftngp10...
When I place the background color through the HTML tag and then do the mouse
over it works as designed...only not when I place the background color
through CSS. Just wondering if when using CSS you have to use a function
instead of just doing the mouse over?
Thanks in advance
"Hans Stavleu" <sta...@planet.nl> wrote in message
news:ape28s$7il$1...@reader13.wxs.nl...
When using Javascript to control CSS, it can only be done
on built-in elements of the DOM ( like body ) or on named
elements(i.e.
<P style="background:red" ID="redparagraph"> ) Then
style attributes are changed by taking your element
variable, redparagraph for this example, doing .style,
and then . the CSS attribute. You CANNOT set CSS
attributes in java that were not already set in the CSS.
There is your lesson for the day. For more info, look at
the DHTML tutorial on www.webmonkey.com.
Kyle
>.
>