[Solved] CSS trick for maximum inline image indentation [closed]


Found the answer. Took me a lot of time, and brought me to the darkest corners of CSS.
And yet, I’ve emerged enlightened – and the answer is so simple….

<div id="container" style="width:auto">
    <div id="text"> some varying text here... </div>
    <div id="img" style="width: 10px; background: url(img.png)">
</div>

And The CSS:

#text { 
    width:auto; 
    max-width: 100%; 
    overflow: hidden; 
    text-overflow: ellipsis; 

    padding-right: 10px;
    margin-right: -10px;
    box-sizing: border-box;
}

As shown in this fiddle

solved CSS trick for maximum inline image indentation [closed]