HTML button question
- Started
- Last post
- 8 Responses
- TedUmptious
Hello... still working on my portfolio here and a bit of a newbie at the html. I've set up a single page html site with the slideshow pro component in a swf placed into it. I have a set of HTML buttons that control the content loaded into slideshow pro. Is there a way in html/javascript to get the button that the user selects to stay highlighted. That way the user can tell which button they pressed. I don't want to have to go to a different page as I'd have to re-load the flash component and that would slow the user experience down. ANy thoughts?
- ian0
Hey there, if its just a hyperlink then use your link styles the "a:active" can be changed to the same style as "a:hover" which means that when clicked it'll have the same style as the hover until another link is clicked. Or if you're doing it with images, use multiple image rollovers to create the same effect.
- TedUmptious0
Sounds cool ian. I've set the 'active' style in the page preferences in Dreamweaver to the colour I want it to stay but no joy. Is it better to set these things in a seperate CSS style sheet? Sorry I know this is probably HTML 101!
- ian0
Well I usually use separate CSS pages but think it works the same.
Try using this one, its one i've used on a site and seems to work fine, just replace you're existing a:link style with it to test.a:link {
color: #FF9933;
}
a:visited {
color: #FF9933;
}a:focus {
color: #00ACEE;
}a:hover {
color: #00ACEE;
}a:active {
color: #00ACEE;
}- This should just change the links colour on rollover and click.ian
- TedUmptious0
Thanks Ian, I just tried that. It works in Firefox but not Safari. Thats better than nothing I guess!
- ian0
Actually, I think the order I gave you is wrong and is one of the reason s its buggy in safari, try this:
a:link {
color: #FF9933;
}
a:visited {
color: #FF9933;
}
a:hover {
color: #00ACEE;
}
a:active {
color: #00ACEE;
}
a:focus {
color: #00ACEE;
}
- TedUmptious0
:(
Still works in Firefox. Didn't work in safari.- dang. ok, I'll hunt around in a bit, up to me eyes at the mo, so leave it with me!ian
- I'll buy you a pint!TedUmptious
- ian0
hey teddy boy! I've just sent you a workaround for this. Let me know if its what you needed.
- TedUmptious0
Genius.