.sidebar_menu:active not works? Need help

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
rahulephp
Forum Commoner
Posts: 28
Joined: Mon Oct 05, 2009 11:05 am

.sidebar_menu:active not works? Need help

Post by rahulephp »

Hi there,
Kindly have a look on below CSS property.
What i want to ask is: when i'll click on a button, it should be look active. I mean it would have to get property of .sidebar_menu:active
But it doen't works.
Please elp me out from this.





<!--Sidebar menu button start-->

.input {
color : #FF9000;
font-size:20px;
;
}

.sidebar_menu{
border: 0px;
background: url('images/word-real.jpg') no-repeat top left;
font-size:18px;
font-weight:bold;
text-decoration:none;
color:#FFFFFF;
font-family: Verdana, Arial, Helvetica;;
width:97px;
height:42px

}
.sidebar_menu:hover {
border: 0px;
background: url('images/word-over.jpg') no-repeat top left;
color:#009BC9;

}

.sidebar_menu:active {
border: 0px;
background: url('images/word-over.jpg') no-repeat top left;
color:#009BC9;
}

br { clear: left; }
<!--Sidebar menu button End-->





<a rel="11"><input type="button" value="worship" class="sidebar_menu"/></a>
<a rel="22"><input type="button" value="prayer" class="sidebar_menu"/></a>
<a rel="33"><input type="button" value="cell" class="sidebar_menu"/></a>
<a rel="44"><input type="button" value="city" class="sidebar_menu"/></a>
<a rel="55"><input type="button" value="mission" class="sidebar_menu"/></a>
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: .sidebar_menu:active not works? Need help

Post by pickle »

Pseudo-classes (:hover, :active, etc) don't work in IE on anything other than <a> tags. Also, I'm not sure :active can be applied to buttons.

You're markup doesn't make sense to me. Why are you putting a button - which isn't set to act like a submit button or anything else useful - inside an <a> tag that doesn't have a href attribute?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply