Below is the HTML code which is also linked to a Bootstrap popover:
<div class="event" style="top: 0%; width: 100%;">
<span class="test">Layouts</span>
<div class="value">
test
</div>
<span class="test">Starts</span>
<div class="value">2014/12/12, 11:00</div>
<span class="test">Ends</span>
<div class="value">2015/1/16, 00:00</div>
</div>
Here's the corresponding SCSS:
& > div.event {
// position: absolute;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
background-color: rgba(41, 128, 185,.7);
outline: 1px solid rgba(155, 89, 182,1.0);
min-height: 30px;
color: white;
// width: 100%;
height: 30px;
padding: 5px;
z-index: 1;
font-size: 0.7em;
.test {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
float:left;
// text-transform: uppercase;
font-weight: 200;
padding: 0;
}
.value {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
float:left;
color: rgba(255,255,255,0.5);
margin-bottom: 5px;
i.fa-external-link {
cursor: pointer;
line-height: 23px;
}
}
.value, .test {
padding-right: 5px;
}
The issue I am facing is that when I reduce the size of the '.event' container (let's say to 5%), the text gets cut off and I want it to show as ellipsis instead. I have tried using 'overflow:hidden' with 'white-space:nowrap' and setting 'text-overflow', but it doesn't seem to work. Am I missing something obvious? Let me know if you need more HTML and CSS for further analysis.
Here's a Fiddle demonstrating the problem: http://jsfiddle.net/q1go1471/2/