---
title: "Apply mouse hover on gridview in MVC using custom css"  
description: "Apply mouse hover on gridview in MVC using custom css"  
author: "Anonymous User"  
published: 2017-12-14  
updated: 2017-12-14  
canonical: https://www.mindstick.com/forum/34399/apply-mouse-hover-on-gridview-in-mvc-using-custom-css  
category: "c#"  
tags: ["asp.net mvc", "mvc", "mvc4", "razor"]  
reading_time: 2 minutes  

---

# Apply mouse hover on gridview in MVC using custom css

Hi,

I want to [apply](https://www.mindstick.com/articles/13148/discover-to-apply-make-up-like-a-professional-supermodel) [mouse hover](https://answers.mindstick.com/qa/30760/how-to-change-div-color-on-mouse-hover-using-css) on my [gridview](https://www.mindstick.com/articles/873/update-delete-edit-gridview-in-asp-dot-net) using [custom css](https://www.mindstick.com/forum/34385/add-custom-css-in-razor-view).

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....

## Replies

### Reply by Hemant Patel

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 .....!!


---

Original Source: https://www.mindstick.com/forum/34399/apply-mouse-hover-on-gridview-in-mvc-using-custom-css

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
