Hello,
I am working on a MVC2 site and am having issues getting my objects on my views to inherit the css classes.
Here is my helper object and CSS that is saved in the Site.css which is linked in the master page.
This also works fine if I put the CSS in a tag on the masterpage.
<%= Html.ListBox("ExpenseItems", (System.Web.Mvc.SelectList)ViewData["ExpenseDefinitions"], new { @class = "optionlist" })%>
.optionlist
{
width:100px;
height:100px;
}
Browser HTML:
..
<link href="../Content/Site.css" rel="stylesheet" type="text/css" />
..
<select class="optionlist" id="ExpenseItems" multiple="multiple" name="ExpenseItems">
<option value="1">Test</option>
</select>