Gadget
ɯƃıpɐɹɐd ssǝןpuǝ
Posts: 908.2697 Threads: 69
Joined: 23rd Apr 2008
Reputation: 0.85528
E-Pigs: 63.3012
|
[SOLVED] HTML/JAVA mouseover code
Ok, I am trying to edit some of my templates & I am trying to make before/after images when moused over.
A code that works properly on my forum is:
Now my forum's skin had a back button & forward button in the header, (part of the vista theme)..So I thought why not put these dummy images to use, so I anchored each image with history codes:
Back code:
Forward code:
After leaving those for a few days, Me and a friend wanted to add before/after images when moused over so this is the code I came up with:
Now this does not work at all, IDK why?! It is almost exactly the same as the other expect for the link is pointed at users history...
I think maybe because the image is not hot linked to a url rather then pointing at the history as it is...I have not tried adding a href="" to it because I don't want to, but is that the reason, or do I have a error I don't see? Or am I missing something since the button is pointed at the users history?
(This post was last modified: 02/08/2009 06:33 PM by Gadget.)
|
|
01/08/2009 10:38 PM |
|
Mickey
Down with MJ yo
Posts: 3,663.2843 Threads: 251
Joined: 26th Apr 2008
E-Pigs: 28.7300
|
RE: [HELP] HTML mouseover code
Don't see why that isn't working, but why not try using jQuery? Imo it's a lot easier than javascript
The code could be
(This post was last modified: 01/08/2009 11:04 PM by Mickey.)
|
|
01/08/2009 11:02 PM |
|
Gadget
ɯƃıpɐɹɐd ssǝןpuǝ
Posts: 908.2697 Threads: 69
Joined: 23rd Apr 2008
Reputation: 0.85528
E-Pigs: 63.3012
|
RE: [HELP] HTML mouseover code
Mickey Wrote:Don't see why that isn't working, but why not try using jQuery? Imo it's a lot easier than javascript
The code could be
Good, I feel a little better, that you don't see why it don't work...I been banging my head against my keyboard trying to figure it out...
As for jQuery, hmmm I don't know that language, but I will see if I can get it to do what I want.
Thanks for the reply : D
(This post was last modified: 01/08/2009 11:19 PM by Gadget.)
|
|
01/08/2009 11:19 PM |
|
Mc Cabe
Storm Trooper
Posts: 1,218.1771 Threads: 177
Joined: 14th Aug 2007
Reputation: 1.43435
E-Pigs: 38.5281
|
RE: [HELP] HTML/JAVA mouseover code
Hmmm I always try to use css instead of javascript. Try this:
umm?
|
|
02/08/2009 12:03 AM |
|
Gadget
ɯƃıpɐɹɐd ssǝןpuǝ
Posts: 908.2697 Threads: 69
Joined: 23rd Apr 2008
Reputation: 0.85528
E-Pigs: 63.3012
|
RE: [HELP] HTML/JAVA mouseover code
Mc Cabe Wrote:Hmmm I always try to use css instead of javascript. Try this:
Well your code worked perfectly for the mouse over image however...It displayed that image allover my board & affected the main CSS,...
Maybe I didn't put it in the right spot? I used the code on the bottom box on my Additional CSS Definitions bottom box beneath all other codes...
look at what it did:
Do you know what I did wrong or? I am on a VB3.8.2 if it helps...
|
|
02/08/2009 10:22 AM |
|
Mc Cabe
Storm Trooper
Posts: 1,218.1771 Threads: 177
Joined: 14th Aug 2007
Reputation: 1.43435
E-Pigs: 38.5281
|
RE: [HELP] HTML/JAVA mouseover code
geez louise! hehe
'a' means all links, so all links have that styling. Try:
couldn't think of a good name for the class, feel free to change it :)
umm?
(This post was last modified: 02/08/2009 10:31 AM by Mc Cabe.)
|
|
02/08/2009 10:28 AM |
|
Gadget
ɯƃıpɐɹɐd ssǝןpuǝ
Posts: 908.2697 Threads: 69
Joined: 23rd Apr 2008
Reputation: 0.85528
E-Pigs: 63.3012
|
RE: [HELP] HTML/JAVA mouseover code
Mc Cabe Wrote:geez louise! hehe
'a' means all links, so all links have that styling. Try:
My fault, I should've known... I don't use CCS in VB that much so I don't use it period that much,...
Thanks for your help, I appreciate it. I will see if it corrects my issue,
EDIT:
The code works great now, only one issue left to sort out if you could help me with it?
This code causes the aligned images to stack ontop of eacoter...Make sense? Back & Forward button are next to eachother until I use this code & then they stack cause lots of stuff to mis-align...
Almost like there is a <BR> tag in it!? Is there a way to bring it back up next to eachother??
(This post was last modified: 02/08/2009 12:13 PM by Gadget.)
|
|
02/08/2009 10:48 AM |
|
ZiNgA BuRgA
Smart Alternative
Posts: 17,022.2988 Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.1274
|
RE: [HELP] HTML/JAVA mouseover code
Get rid of the "display: block;" line, though that might have some other effects.
|
|
02/08/2009 04:01 PM |
|
Gadget
ɯƃıpɐɹɐd ssǝןpuǝ
Posts: 908.2697 Threads: 69
Joined: 23rd Apr 2008
Reputation: 0.85528
E-Pigs: 63.3012
|
RE: [HELP] HTML/JAVA mouseover code
ZiNgA BuRgA Wrote:Get rid of the "display: block;" line, though that might have some other effects.
lol, I did do that as I was researching CSS,..
I tried a few different options, "display: inline" was the best so far but caused the mouse over image to appear half shown and only at the bottom half of the area it is suppose to appear at.
|
|
02/08/2009 04:58 PM |
|
ZiNgA BuRgA
Smart Alternative
Posts: 17,022.2988 Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.1274
|
RE: [HELP] HTML/JAVA mouseover code
You probably need to set a width and height for the image. It's being set as a background so the element itself isn't sized to that.
|
|
02/08/2009 05:00 PM |
|