I try to set background to dd and dt elements that exist into dl element.I use this selector but don't work.Please advice.
CSS:
dl.dl-horizontal dt:odd {
background: rgba(45, 177, 227, 0.34);
}
Html:
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.HistoricalName)
</dt>
<dd>
@Html.DisplayFor(model => model.HistoricalName)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Address)
</dt>
<dd>
@Html.DisplayFor(model => model.Address)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Title)
</dt>
<dd>
@Html.DisplayFor(model => model.Title)
</dd>
<dt>
@Html.DisplayNameFor(model => model.InsertDate)
</dt>
<dt>
@Html.DisplayNameFor(model => model.LocationX)
</dt>
<dd>
@Html.DisplayFor(model => model.VisitorEn)
</dd>
</dl>