Im trying to create a one mouse over effect that will show a background when the mouse is over an table column.

Anyone that knows how this can be done?

Thanks.

Recommended Answers

All 3 Replies

<html><head>
<style type='text/css'>
.thisclass { text-decoration:none; }
.thisclass:hover { background-color: /* url: whatever.image; */ repeat:repeat-y;#66cdaa; text-decoration:none; } 
</style>
</head><body>
bla bla bla
<element class='thisclass'>bla bla bla</element>
bla bla bla
</body>
<script type="text/javascript">
//<![CDATA[
<!-- 
image1 = new Image();
image1.src = "whatever.image;";
//-->
//]]>
</script>
</html>

image background for chosen element, and caches the image after the page is loaded so that mouseover effects work immediately

Thanks.

I tried to use your script and changed "whatever.image" to the image I'd like to use, but somehow it doesn't work.

I can only see the "bla bla bla" on the website, nothing happens when I have the mouse over the text, etc.

<html><head>
<style type='text/css'>
.thisclass { text-decoration:none; }
.thisclass:hover { background-color: /* url: imageadress.gif; */ repeat:repeat-y;#66cdaa; text-decoration:none; } 
</style>
</head><body>
bla bla bla
<element class='thisclass'>bla bla bla</element>
bla bla bla
</body>
<script type="text/javascript">
//<![CDATA[
<!-- 
image1 = new Image();
image1.src = "imageadress.gif;";
//-->
//]]>
</script>
</html>

Thanks.

I tried to use your script and changed "whatever.image" to the image I'd like to use, but somehow it doesn't work.

I can only see the "bla bla bla" on the website, nothing happens when I have the mouse over the text, etc.

<html><head>
<style type='text/css'>
.thisclass { text-decoration:none; }
.thisclass:hover { background-color: /* url: imageadress.gif; */ repeat:repeat-y;#66cdaa; text-decoration:none; } 
</style>
</head><body>
bla bla bla
<element class='thisclass'>bla bla bla</element>
bla bla bla
</body>
<script type="text/javascript">
//<![CDATA[
<!-- 
image1 = new Image();
image1.src = "imageadress.gif;";
//-->
//]]>
</script>
</html>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.