In the Fiddle link, you can see image with some content. What I want is .g_container li strong
should get truncated with dynamic width but now its getting hidden. Its width should stop spreading with image width. now I gets hidden and (3 dots) ...
were not visible even if I use text-overflow:ellipsis
.g_container li strong {
text-align: center;
font-size: 13px;
font-weight: bold;
padding: 8px 10px 4px !important;
line-height: 30px;
color: #000;
text-transform: uppercase;
height: 30px;
overflow: hidden;
width:100px;
text-overflow: ellipsis;
white-space: nowrap;
background:yellow;
}
In bigger resolution, the Lorem ipsum text (ie. with yellow background) looks fine. But for smaller resolutions, text does not get truncated instead getting hidden.
I went through lot of SO questions related to dynamic text truncation, but nothing is related with my requirement.
Edit:
I have images in both landscape and portrait formats and don't know exact dimensions of the images. For ladscape images there is no problem. but for portrait, empty white space is coming according to text width. Can someone help me to solve this issue?