I am using 2 different partial views in my main view:
<div class="col-md-6">
@Html.Action("Chart", "Teams")
</div>
<div class="col-md-6">
@Html.Action("SeriesWinsChart", "Teams")
</div>
<div class="next-game">
<h3 class="text-center">The Next Game Is:</h3>
</div>
<br />
<div class="text-center">
<h3 style="color:red;">@ViewBag.NextGame</h3>
</div>
The issue I am facing pertains to the background size when applying background-color: green
to the .next-game
class. I want the background to only appear around The Next Game Is:.
CSS:
.next-game{
background-color: green;
}
I have attempted adjusting the width and height properties in CSS, but haven't had success in resizing the background.
UPDATE:
I modified the HTML structure as follows:
<div class="next-game">
<h3 class="text-center">The Next Game Is:</h3>
<div class="text-center">
<h3 style="color:red;">@ViewBag.NextGame</h3>
</div>
</div>
<div class="col-md-6">
@Html.Action("Chart", "Teams")
</div>
<div class="col-md-6">
@Html.Action("SeriesWinsChart", "Teams")
</div>
This adjustment resolved the rendering issue with the background, leading me to believe it has something to do with the partial views being used.