Solved

CSS hover not working...

Posted on 2014-07-26
4
277 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Diff of the day 2 42
Save data in two Database, Asp 2 69
Insert PHP into HTML page. 7 52
Can't Find The Code 15 19
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

739 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