Webforumz's RSS FeedRSS Webforumz RegistrationRegister Contact Webforumz StaffContact

Making a rollover stick when clicked

This is a discussion on "Making a rollover stick when clicked" within the Web Page Design section. This forum, and the thread "Making a rollover stick when clicked are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Closed Thread
 
LinkBack Thread Tools
  #1  
Old Apr 7th, 2004, 03:42
New Member
Join Date: Apr 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Making a rollover stick when clicked

I’m having a problem with my side navigation bar. I’m using background and text to do it. I’ve got my green buttons to rollover to dark green when I mouseover. I would like if, when the button was clicked on, the button stayed dark green (until the next button is clicked at which time it would be green again).

I’ve tried (see below) to use a:active {… and a:focus {… to do this and it doesn’t do what I would like it to.

You can’t see this problem on the web (because it’s not there) but I’ve included my html and my css code in the hopes that someone might be able to help me.

Cheers!

<div id="sidenav">
Home
Where is?
Tourism
Municipal Government Information
News/Reports
</div>

/* Side Navigation*/

#sidenav a {
font-family: "Impact";
font-size: 15px;
color:#FFFFFF;
width:180px;
border-bottom: solid;
background:green;
text-align:left;
margin-top:0px;
padding:3px;
display:block;
text-decoration:none;
}
#sidenav a:hover {
background:#004B18;
color:#FFFFFF;
}
#sidenav a:focus {
background:#004B18;
color:#FFFFFF;
}
#sidenav a:active {
background:#004B18;
color:#FFFFFF;
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #2  
Old Apr 7th, 2004, 04:07
Highly Reputable Member
Join Date: Aug 2003
Location: Australia
Posts: 662
Thanks: 0
Thanked 0 Times in 0 Posts
yeah, i have had the same problem doing it this way. Honestly, I find it a lot easier just to put the clicked button on the page you just clicked on.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
Old Apr 7th, 2004, 05:01
New Member
Join Date: Apr 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Yes...that's a good idea! Thanks very much!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #4  
Old Apr 7th, 2004, 07:59
Highly Reputable Member
Join Date: Aug 2003
Location: Australia
Posts: 662
Thanks: 0
Thanked 0 Times in 0 Posts
Your welcome :wink:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #5  
Old Apr 7th, 2004, 08:26
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Yeah, unless you're using frames the easiest thing is to just hard code the button as clicked. Other than doing something more complex with a server side script.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread

Tags
making, rollover, stick, clicked

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stick with what I've got or re-design? 1840dsgn Website Planning 25 Oct 8th, 2007 20:52
Rollover and disjointed rollover on same items? jtyoungs Web Page Design 37 Oct 1st, 2007 15:05
the value of the global variable doesn't stick! help plz Sanoriah Flash & Multimedia Forum 4 Sep 8th, 2006 13:51
Making a footer stick to the bottom bob_visualefx Web Page Design 8 May 26th, 2006 14:32


All times are GMT. The time now is 19:41.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8