Solved

Way to have hovering effect

Posted on 2016-09-13
4
51 Views
Last Modified: 2016-09-14
Hi,
I want to have hovering effect (have deep color when mouse is on top of the Linkbutton). What to adjust below?
<body>
    <form id="main_form" runat="server">
    <div class="content" id="wrapper">
    <table width="100%">
        <tr>
            <td align="right" style="ForeColor:#0A2757;">
            <asp:LinkButton ID="lb_reg" 
                Text = "Register"
               CssClass="lb_reg"
               Font-Names="Times New Roman" 
               Font-Size="10pt" 
               OnClick="lb_reg_Click" 
               runat="server"/>
               &nbsp;|&nbsp; 
               <asp:LinkButton ID="lb_log" 
               Text = "Login"
               CssClass="lb_log"
               Forecolor="#0A2757"
               Font-Names="Times New Roman" 
               Font-Size="10pt" 
               OnClick="lb_log_Click" 
               runat="server"/>
               &nbsp;|&nbsp; 
               <asp:LinkButton ID="lb_supp" 
               Text = "Support"
               CssClass="lb_log"
               Forecolor="#0A2757"
               Font-Names="Times New Roman" 
               Font-Size="10pt" 
               OnClick="lb_supp_Click" 
               runat="server"/>
            </td>
        </tr>
        ...
            .lb_reg{
                color: black;
                top: 30px;
                left: 1075px;
                width: 36px;
                height: 30px;
                font-size: large;
                font-weight: bold;
                text-decoration: none;
            }  
            .lb_reg:hover{
                background-color: black !important;
                color: white !important;
            }  
            .lb_log{
            color:#000!important;
            top: 30px;
            left: 1130px;
            width: 36px;
            height: 30px;
            font-size:large;
            font-weight:bold;
            }  

Open in new window

0
Comment
Question by:HuaMinChen
  • 2
  • 2
4 Comments
 
LVL 21

Expert Comment

by:Kim Walker
Comment Utility
I deleted my previous comment when I noticed you have three LinkButtons. The CSS code you have here should work for the first LinkButton. Does it not? Do you want the same effect on the other two LinkButtons?
0
 
LVL 10

Author Comment

by:HuaMinChen
Comment Utility
Yes, I do not see hovering effect to all 3 LinkButtons.
0
 
LVL 21

Accepted Solution

by:
Kim Walker earned 500 total points
Comment Utility
Is it already working on the first LinkButton? If so, just add the other two classes to your style configuration. (See change on line 11 below.)
            .lb_reg{
                color: black;
                top: 30px;
                left: 1075px;
                width: 36px;
                height: 30px;
                font-size: large;
                font-weight: bold;
                text-decoration: none;
            }
            .lb_reg:hover, .lb_log:hover, .lb_supp:hover{
                background-color: black !important;
                color: white !important;
            }
            .lb_log{
            color:#000!important;
            top: 30px;
            left: 1130px;
            width: 36px;
            height: 30px;
            font-size:large;
            font-weight:bold;
            }

Open in new window

0
 
LVL 10

Author Comment

by:HuaMinChen
Comment Utility
Thanks a lot. BTW, what to adjust below, as ForeColor is underlined?
7t.png
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
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…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now