Looking for a way to ensure that tags on my blog post always display on one line, I have created a div containing several spans. How can I achieve this using CSS?
<div>
<span class='tag'>math</span>
<span class='tag'>physics</span>
<span class='tag'>mathematical induction</span>
<span class='tag'>theoretical physics</span>
</div
I want to prevent the span from breaking between mathematical
and induction
, as well as between theoretical
and physics
. Each tag span has specific styling to make them visually distinct:
.tag {
background-color: #aaaaaa;
padding: 10px;
margin-right: 10px;
margin-bottom: 10px;
line-height: 400%;
color: white;
}