Apply mouse hover on gridview in MVC using custom css

Hi,

I want to apply mouse hover on my gridview using custom css. 

Below is my code.

 <div class="qa-part-nav-list">

        <ul class="qa-browse-cat-list">
            @foreach (var item in Model)
            {
                <li class="qa-browse-cat-item qa-browse-cat-arts-and-humanities">
                    <a href="@Url.Action("QuestionByCategory", "home", new { @category = item.UrlSlug })">
                        <span style="font-size: medium">
                            @if (item.Name.Length > 14)
                            {
                                @item.Name.Substring(0, 14).ToString();
                            }
                            else
                            {
                                @item.Name.ToString();
                            }
                        </span>
                        <span class="badge badge-info pull-right">@item.TotalPost questions</span>
                    </a>
                </li>
            }
        </ul>
    </div>

Please give me some solution to accomplish this task....

Last updated:12/14/2017 11:54:01 PM

1 Answers

Harsh kumar srivastava
Harsh kumar srivastava

Hi Satish,

Please follow below line of code to achieve your task.

<style>

    .badge-info {
        background-color: #061660; // You can change color as your requirement
    }

        .badge-info:hover {
            background-color: #0623aa; // You can change color as your requirement
        }
</style>

Hope its informative .....!!

Answer