[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

ASP.net using two  CSS styles on one button

Posted on 2014-04-14
3
Medium Priority
?
1,178 Views
Last Modified: 2014-04-14
Hi

I am trying to use the following code to ensure that one button changes color
on mouse hover and is left justified but I noticed that you can only specify one CSSClass
name    <button id="button10"  class="myHoverButton">Submit</button>
How do I adjust the following code so that both the mouse hover and the left justification
can be applied to one button?

    <style type="text/css">
        .style1
        {
            height: 34px;
        }
        .myHoverButton:hover { background-color: #9999ff; }
        .btnstyle {
            text-align:left;
            }
    </style>
0
Comment
Question by:Murray Brown
[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
3 Comments
 
LVL 5

Accepted Solution

by:
jayakrishnabh earned 1200 total points
ID: 39998718
<style type="text/css">
        .style1
        {
            height: 34px;
        }
        .myHoverButton:hover {
          background-color: #9999ff;
         
        }
        #button10 {
            text-align:left;
            }
    </style>
0
 
LVL 14

Assisted Solution

by:Dustin Hopkins
Dustin Hopkins earned 800 total points
ID: 40000079
You can specify multiple classes to html elements, it is in fact how many frameworks such as twitter bootstrap work.
So to add multiple do this, you can add as many as you want:
<button id="button10"  class="myHoverButton btnstyle">Submit</button>

Open in new window


Hope this helps,
Dustin
0
 

Author Closing Comment

by:Murray Brown
ID: 40000120
Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

649 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