Working with block element inside a inline element is not acceptable by Html, but i have a scenario , in which i have to make div clickable,
<div class="category-item" style="background-image:url('/Themes/DarkOrange/Content/images/@String.Format("{0}.png", item.Id)');">
<h2 class="title">
<a href="@Url.RouteUrl("Category", new { categoryId = item.Id, SeName = item.SeName })" title="@item.PictureModel.Title">
@item.Name</a>
</h2>
<div class="picture">
<a href="@Url.RouteUrl("Category", new { categoryId = item.Id, SeName = item.SeName })" title="@item.PictureModel.Title">
<img style="border-width: 0px;" alt="@item.PictureModel.AlternateText" src="@item.PictureModel.ImageUrl"
title="@item.PictureModel.Title" /></a>
</div>
</div>
I want to place the above div class category-item inside an anchor tag which is clickable:
<a href="@Url.RouteUrl("Category", new { categoryId = item.Id, SeName = item.SeName })" title="@item.PictureModel.Title"></a>
The parent div background image changes with the item.id passed to it , therefore the background image is different for each category item, The main aim is to make the div clickable which navigates to the provided routeurl. Is it possible to acheive something like this or is there any other way to acheive this ,
Any suggestion or assistance will be helpful.