I am currently working on a website where I aim to have the name and airport code displayed in a centered title above an image of the airport.
https://i.sstatic.net/Vwi2V.png
The name and code will be separated by an em space:
div.terminal-silhouette-container h3 {
text-align: center;
}
div.terminal-silhouette-links {
text-align: center;
margin-top: 5px;
margin-bottom: 40px;
}
div.terminal-silhouette-preview {
max-width: 500px;
padding: 0;
margin: 0 auto;
}
img.terminal-silhouette-preview {
border: 1px solid $color-border;
}
<div class="col-lg-6 terminal-silhouette-container">
<h3>Orlando (International) MCO</h3>
<div class="terminal-silhouette-preview">
<a href="files/terminal-silhouettes/png/MCO.png">
<img class="img-responsive terminal-silhouette-preview" src="/assets/projects/terminal-silhouettes/MCO.png" alt="MCO" />
</a>
</div>
<div class="terminal-silhouette-links"><a href="files/terminal-silhouettes/png/MCO.png">png</a> · <a href="files/terminal-silhouettes/svg/MCO.svg">svg</a></div>
</div>
While this setup works perfectly on larger screens, I encounter issues on narrower mobile screens where the title wraps and one line ends up appearing off-center due to the em space. Is there any way in HTML or CSS to make the browser treat the em space like a regular space, thus ignoring it when it comes to centering text at the end of a line?