Showing posts with label mouseover. Show all posts
Showing posts with label mouseover. Show all posts

Tuesday, December 16, 2008

CSS Java Free OnMouseOver

Thanks to some help from a friend Basik its complete!

Simple and NO JAVA!


Now I know it's not perfect but if you can't use java its better then nothing! Anyways you might be able to improve on it.





CSS


Code:

.MouseOvr {
width:75px;
height:32px;
background: url("");
display:block;
}
.MouseOvr :link,
.MouseOvr :visited {
width:75px;
height:32px;
background: url("");
display:block;
}
.MouseOvr a:hover {
width:75px;
height:32px;
background: url("http://www.google.ca/intl/en_ca/images/logo.gif");
display:block;
}

.MouseOvr a:hover span {
visibility: hidden;
}


HTML: Add this anywhere in your page you want the link.


Code:

< h1 class="MouseOvr">
< a href="http://google.ca">
Link
< /a>
< /h1>

(Remove spaces from tags.)
Enjoy!

Marquee w/onmouseover

Again another code that should work on sites like zanga etc..

< marquee behavior="scroll" direction="up" scrolldelay="500" scrollamount="25" onmouseover="this.stop()" onmouseout="this.start()" width="397" height="366">


[As always remove the spaces from the tags.]

Image Mouseover without java!

I used to use a website that prohibited the use of any kind of java as well as iframes. It also was very limited in terms of using css because you could not access any of the raw html files and everything input into the site passed through a filter to prevent abuse. All I wanted was to have mouseovers! well I found a way on my own after having no luck in any web help forums - yeah I was just as surprised!

When I told people I wanted to have mouseovers with no css or java script they told me it wasn't possible, well here is the code I made that worked :)


< IMG SRC="images/image_1.gif" ALT="Text Description" WIDTH=88 HEIGHT=42 border="0" id="msg"
onmouseover="document.getElementById('msg').src='rollovers/image_2.gif'" ALT="Text Description" WIDTH=88 HEIGHT=42 border="0"
onmouseout="document.getElementById('msg').src='images/image_1.gif'" ALT="Text Description" WIDTH=88 HEIGHT=42 border="0" >


[As always remove the spaces from the tags.]