Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

apply ellipsis when label text is overflow

In this below html design, I want to apply text-overflow to ellipsis for the media-played and remarks label and want the media-played (first big line) on the first line and remarks (second bing line) would go on the next line. The Play and Stop and media-played and remarks should all fall in the same row. Can you please help me out?

.oneline {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#player-play, #player-stop
{
   display: inline-block;
   width: 48px;
   height: 48px;
}
#player-play
{
    background-image: url('../images/play.png');
}
#player-stop
{
   background-image: url('../images/stop.png');
}


 <div  id="player" data-role="header">
        <div data-role="navbar">
            <ul>
                <li class="oneline">
                    <a href="#" id="player-play" title="Play / Pause" style="float:left" ></a>
                    <a href="#" id="player-stop" title="Stop" style="float:left" ></a>
                    <label id="media-played" class="oneline">first big line first bing line first bing line first big line</label>
                    <label id="remarks">second big line second big line second big line second big line</label>
                </li>
            </ul>
        </div>
            <div data-role="navbar">
                <ul>
                    <li>
                        <input type="range" id="time-slider" data-highlight="true" step=".1" data-mini="true" min="0" max="5.40" value="3.4" disabled>
                    </li>
                </ul>
        </div>
    </div>
like image 947
user845392 Avatar asked Aug 06 '13 14:08

user845392


1 Answers

New CSS:

#media-played,#remarks {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display:block;
}

#player-play, #player-stop
{
   display: inline-block;
   width: 48px;
   height: 48px;
}
#player-play
{
    background-image: url('../images/play.png');
}
#player-stop
{
   background-image: url('../images/stop.png');
}

jsFiddle:http://jsfiddle.net/dTffH/

like image 162
Robert McKee Avatar answered Sep 23 '22 06:09

Robert McKee