I have a simple table and in each row, I have multiple span tags. Each span can have text with different lengths(I just show the structure here):
.label {
float: left;
text-transform: uppercase;
font-size: 12px;
padding: 0.6em 1em;
/*display: inline;
padding: .2em .6em .3em;
font-size: 80%;*/
font-weight: normal;
line-height: 1;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: .25em;
margin-right: 5px;
margin-bottom: 5px;
}
.label-default2
{
background-color:#e8e8e8;
color: #888;
}
.label-default2[href]:hover,
.label-default2[href]:focus
{
background-color: #777;
}
.top2 {
margin-top: 2px;
}
.left {
float:left;
}
<table>
<tbody>
<tr>
<small class="left top2">
<span class="label label-default2" style='white-space:normal; text-align:left;word-break:break-word;'>
Cura - Mlrettet SOSU-Helper
</span>
</small>
<small class="left top2">
<span class="label label-default2" style='white-space:normal; text-align:left;word-break:break-word;'>
Cura - Guided Borgerkonsulent og Visitator
</span>
</small>
</tr>
</tbody>
</table>
I almost get the result I want which is to move text to a new line if it is large. My only problem is now that I get some extra whitespace (in the gray area) as can been seen in the screenshot:
And I'd like it to be like:
Is there any way I can get rid of the extra whitepsace ? Thanks in advance