nonstop328 nonstop328 - 2 months ago 8
CSS Question

How do I let whole DIV can be click and redirect to next page

I want to make a whole

DIV
can be clicked and redirect to next page. How do I edit this code. I am new in
MVC


Here is my
MVC
5 code:



.defaultpage_menu {
cursor:pointer;
text-decoration:none;
color:white;
}

.defaultpage_menu:hover{
text-decoration:none;
color:black;
}

.defaultpage_menu_button{
width:50%;
height:50%;
}

.default_menu_title {
margin:25% 30% 25% 35%;
font-weight:bold;
}

<a>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 defaultpage_menu_button" id="defaultpage_menu_userlisting">
<h1 class="default_menu_title">@Html.ActionLink("User Listing", "Index", "UserTables", new { area = "" }, new { @class = " defaultpage_menu" })</h1>
</div>
</a>




Answer
<a href="@Url.Action("Index","UserTables")" class="defaultpage_menu">
        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6       defaultpage_menu_button" id="defaultpage_menu_userlisting">
            <h1 class="default_menu_title">User Listing</h1>
        </div>
    </a>
Comments