I have been attempting to use white-space:nowrap;
to prevent the span tag in this text from causing a line break, but so far I have not been successful.
The class styles used here are all standard Bootstrap 5 CSS class styles. On wider screens, the time is displayed below the date with a `<br/>
` line break, which is desired. However, on narrower screens, I want the date and time to appear on the same line, with three extra spaces between them. Any suggestions on how to resolve the span/line break issue would be greatly appreciated. The 'carlito' class only sets the font style and color.
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e4868b8b909790968594a4d1cad4cad4c986819085d6">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" />
<div class="col-12 col-md-3 carlito" style="white-space:nowrap;">
<h4 class="text-center text-danger">Sunday 28th March 2021
<span class="d-block d-md-none" style="display: inline-block;"> </span>
<br class="d-none d-md-block" />11AM - 3PM </h4>
</div>