I want to show a few rows of data on a Details page, which each have a title and data on the same row. The data is showing fine, but since my titles are a little long, it is not fitting on the same line. It extends to the next line. For example, I want the title "Speaker's Interaction with Audience" to show in one line/row, instead of "with Audience" showing up on a new line under the first half of the title. I have been playing around for a while, but nothing seems to work.
This is how I have my style in the View
<style>
dl {
width: 395px;
font-size: 15px
}
dd, dt {
padding-top: 5px;
padding-bottom: 5px;
}
dt {
float: left;
padding-right: 5px;
font-weight: bolder;
}
dt {
clear: left;
}
dt, dd {
min-height: 1.5em;
}
</style>
And the structure of my code is like this
<div>
<h4>IndividualSessionEvaluation</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.OnScreenPresentation)
</dt>
<dd>
@Html.DisplayFor(model => model.OnScreenPresentation)
</dd>
<dt>
@Html.DisplayNameFor(model => model.SpeakersSubjectKnowledge)
</dt>
<dd>
@Html.DisplayFor(model => model.SpeakersSubjectKnowledge)
</dd>
<dt>
@Html.DisplayNameFor(model => model.SpeakersInteractionwithAudience)
</dt>
<dd>
@Html.DisplayFor(model => model.SpeakersInteractionwithAudience)
</dd>
</dl>
</div>
` tag has no closing slash. – Rob Jun 10 '17 at 19:09
` isn't this opening and closing for the hr tag? – StraightUp Jun 10 '17 at 21:02
` tag is self closing and has no ending slash: https://developers.whatwg.org/grouping-content.html#the-hr-element – Rob Jun 10 '17 at 21:03