Solved

CSS hover not working...

Posted on 2014-07-26
4
273 Views
Last Modified: 2014-07-26
When I change the css to:
#btn1      <-- remving :hover
{
.
.
}

I can see the effect of hover setting. But with the followings, it doesn't work:
#btn1: hover    
{
.
.
}
.btns: hover      <-- after adding class="btns" to the controls
{
.
.
}

Question: How can I make the hover work?

Thank you.

#btn1: hover
{
  background: #7bb9e0;
  background-image: -webkit-linear-gradient(top, #7bb9e0, #4fa5db);
  background-image: -moz-linear-gradient(top, #7bb9e0, #4fa5db);
  background-image: -ms-linear-gradient(top, #7bb9e0, #4fa5db);
  background-image: -o-linear-gradient(top, #7bb9e0, #4fa5db);
  background-image: linear-gradient(to bottom, #7bb9e0, #4fa5db);
  text-decoration: none;
}

Open in new window

0
Comment
Question by:Mike Eghtebas
  • 2
  • 2
4 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40221687
No space between the : and the hover

#btn1:hover
0
 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 40221702
Thanks.

#btn1:hover works.

because I have multiple buttons,
#btn1, #btn2:hover    doesn't work.

do I have to add hove to each on of them?

#btn1:hover, #btn2:hover  

I tried:
.btns:hover but it didn't work.

MIke
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40221714
Yes you need to add it to each one as they are seperate classes

#btn1:hover, #btn2:hover
0
 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 40221723
Thanks Gary. There is also another question at:
http://www.experts-exchange.com/Programming/Languages/C_Sharp/Q_28484516.html

If you couple of minutes to take a look at.

Mike
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jQuery Sticky Menu 24 36
Hide cell in a table 2 27
How do I select this logo using CSS? 6 29
Need output in powershell ( Vertical format) 2 22
This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question