Previous :: Next Topic |
Author |
Message |
catwoman Member
Joined: 16 Dec 2001 Posts: 888 | TRs | Pics Location: somewhere near Tacoma |
|
catwoman
Member
|
Mon Mar 17, 2003 10:51 pm
|
|
|
I'd like to make some buttons have the hover effect. I've searched all over the web and I keep seeing that it's a java thing. I'm so confused because I thought I saw somewhere that there was simple html code for that. I have no clue what java is, what it means, or how I would need to use it in my page! Would I have to completely redo my web pages in another language just to make my buttons hover? Please help. All I want is html code for it, if there is such a thing!
|
Back to top |
|
|
MCaver Founder
Joined: 14 Dec 2001 Posts: 5124 | TRs | Pics
|
|
MCaver
Founder
|
Mon Mar 17, 2003 11:07 pm
|
|
|
What kind of hover effect do you mean? I've seen text displayed on the status bar at the bottom of the browser window. Is that what you had in mind? I can dig up examples from my old websites, if so.
|
Back to top |
|
|
Fox Guest
|
|
Fox
Guest
|
Mon Mar 17, 2003 11:45 pm
|
|
|
Hey Cat,
If you like the hover style on Peak List, then do a file source thingie, or look at this code (which goes near the top of your web document):
Code: | <style>
A:link {background:white; color:blue; text-decoration:none}
A:visited {background:white; color:blue; text-decoration:none}
A:active {background:white; color:blue; text-decoration:none}
A:hover {background:blue; color:white; text-decoration:none}
</style> |
|
Back to top |
|
|
Sore Feet Member
Joined: 16 Dec 2001 Posts: 6307 | TRs | Pics Location: Out There, Somewhere |
What Fox said only applies to text (but it's still neat). If you want to do images, it's a bit more complicated. If you don't have any experience with Javascript, rollovers may be a little intimidating.
Tutorial
http://www.htmlcenter.com/tutorials/tutorials.cfm/79/Javascript/
(If you want more, search for "image rollovers tutorials" or something to that extent).
|
Back to top |
|
|
Stomp Terminally Indolent
Joined: 28 Jun 2002 Posts: 68 | TRs | Pics Location: Bellevue |
|
Stomp
Terminally Indolent
|
Tue Mar 18, 2003 1:19 am
|
|
|
Well, I suppose it's technically just text, but you can get fairly creative with the :hover psuedo-class in CSS.
It's also possible to do real image rollovers with pure CSS using a transparent gif and the background-image property. Example. It's kind of tweaky, but at least it doesn't involve Javascript! Yay!
And then there's the option of not doing image rollovers at all. Yay yay!
# Stomp (fifty score key-tapping monkeys)
# Stomp (fifty score key-tapping monkeys)
|
Back to top |
|
|
catwoman Member
Joined: 16 Dec 2001 Posts: 888 | TRs | Pics Location: somewhere near Tacoma |
|
catwoman
Member
|
Tue Mar 18, 2003 11:59 am
|
|
|
Can't this just be a simple html code? I've got 3 images for a button. I've got the normal button, the hovered over button, and the pressed down button.
|
Back to top |
|
|
Fox Guest
|
|
Fox
Guest
|
Tue Mar 18, 2003 12:09 pm
|
|
|
Time for you to get a book on HTML.
|
Back to top |
|
|
Tom Admin
Joined: 15 Dec 2001 Posts: 17855 | TRs | Pics
|
|
Tom
Admin
|
Tue Mar 18, 2003 12:16 pm
|
|
|
|
Back to top |
|
|
catwoman Member
Joined: 16 Dec 2001 Posts: 888 | TRs | Pics Location: somewhere near Tacoma |
|
catwoman
Member
|
Tue Mar 18, 2003 12:17 pm
|
|
|
I have a HUGE book on html but I don't see anything about hovering buttons in it.
|
Back to top |
|
|
MCaver Founder
Joined: 14 Dec 2001 Posts: 5124 | TRs | Pics
|
|
MCaver
Founder
|
Tue Mar 18, 2003 12:20 pm
|
|
|
You can't do it in standard HTML. It will have to be in something like JavaScript or style sheets as per the examples above.
|
Back to top |
|
|
Sore Feet Member
Joined: 16 Dec 2001 Posts: 6307 | TRs | Pics Location: Out There, Somewhere |
Doing a three image rollover is also significantly more complicated than doing a two image rollover.
The best way to do rollovers without having to worry about the coding is with either Photoshop, Fireworks or Dreamweaver. Both Photoshop and Fireworks create all the code for you when you save the image(s), and Dreamweaver has a nifty little wizard that adds the rollover functionality in about 5 seconds.
If you've never done rollovers before, I suggest not trying to do a three state rollover, you'd probably go bald from yankin' all you hair out because the code didn't work.
You can download a free 30 day trial of Fireworks (at www.macromedia.com), but you have to make an account with them (free - but have an alternate email that you don't mind getting spammed at).
|
Back to top |
|
|
Mr. HTML Guest
|
|
Mr. HTML
Guest
|
Tue Mar 18, 2003 1:46 pm
|
|
|
|
Back to top |
|
|
catwoman Member
Joined: 16 Dec 2001 Posts: 888 | TRs | Pics Location: somewhere near Tacoma |
|
catwoman
Member
|
Tue Mar 18, 2003 2:10 pm
|
|
|
I have photoshop but how does it do the code for me?
Mr Html - You don't have to answer the question if you don't want to help! But keep your rude comments to yourself, please! If you only had a clue......
|
Back to top |
|
|
Rich Baldwin Mister Eddie
Joined: 22 Dec 2001 Posts: 1686 | TRs | Pics Location: Martinique |
Couldn't you use an animated gif for the button? Just add in a few layers.
Was you ever bit by a dead bee?
Was you ever bit by a dead bee?
|
Back to top |
|
|
Stomp Terminally Indolent
Joined: 28 Jun 2002 Posts: 68 | TRs | Pics Location: Bellevue |
|
Stomp
Terminally Indolent
|
Tue Mar 18, 2003 9:29 pm
|
|
|
A rollover plus clicked image is entirely possible (even easy) with style sheets, and has the advantage of being completely standard official HTML. Here's another quick example I threw together:
Rollover and clicky button
Vive la standards compliance.
# Stomp (fifty score key-tapping monkeys)
# Stomp (fifty score key-tapping monkeys)
|
Back to top |
|
|
|