0

私は次のhtmlとcssを持っています

<div id="car-76" class="thumbnail_car thumbnail span2">
    <div class="thumbnail_creator">
        <hr>
        <div class="creator_img">
            <img alt="Bob Smith" height="40x40" src="http://www.gravatar.com/avatar/df61dcc6eec08cb7d62f1959b89ae843?s=40&d=identicon&r=PG" width="40x40">
        </div>
        <div class="creator_details"> <a href="/users/2" title="John Malkovitchlongname the 3rd">
                       John Malkovitchlongname the 3rd
</a> 
        </div>
        <div class="creator_followers"> <a href="/users/2/followers"><i class=" icon-eye-open" title="Followers"> </i></a> 0</div>
        <div class="thumbnail_follow" id="follow_btn-2"> <a class="btn btn-primary" data-method="post" data-remote="true" rel="nofollow">Follow</a>

        </div>
    </div>
</div>

関連するcssは

.thumbnail_creator .creator_details {
    display: inline-block;
    font-size: 77%;
    position: absolute;
    left: 44px;
    overflow: hidden;
    text-overflow: clip;
}

divの最後に達したら長い名前を切り取り、改行しないようにしたい

何らかの理由でoverflow: hidden、テキストを非表示にしてテキストtext-overflow: clipをクリップしても何も起こりません

したがって、代わりに:

ここに画像の説明を入力

私はそれが欲しい(結果を達成するために名前を編集した後)

ここに画像の説明を入力

ここでフィドル

4

2 に答える 2