2016-05-16 2 views
0

リンクアイコンが左側にあり、矢印が右側にあります。私が問題を抱えているのは、リンクテキストが折り返されているため、非常にうまくいくとは限りません。私はここでhttp://jsfiddle.net/MrLister/3xbfyqkh/のようなものを実現するにはどうしたらよいですか?ラップ時に画像アイコンのあとにリンクテキストを挿入する

<div class="linkitem" id="myTools" style= 
"display:inline-block; padding:4px 0 4px 0; width:90%;"> 
    <a href="{$ItemEditURL}" id="InlineEditLink" style= 
    "cursor: pointer; position:relative; top: 4px; margin-right:5px;"><img height="14" 
    src= 
    "https://maxcdn.icons8.com/Android_L/PNG/24/Programming/edit_property-24.png" 
    title="Edit" width="14"></a> <a href="{$SafeLinkUrl}" style= 
    "color: white !important!" target="_blank" title="{@LinkToolTip}">A 
    very long descriptive Link text goes here</a> 
</div> 
<div class="wrapperArrow" style="float:right; padding-top:5px;"><img alt="" 
src= 
"https://maxcdn.icons8.com/windows10/PNG/16/Arrows/double_right-16.png"></div><br> 

<br><br><br><br><br><br><br> 
<hr> 
Free Icons provided by <a href="https://icons8.com">Icons8</a> 

ここに私のバイオリン... https://jsfiddle.net/a2gruae6/

+0

として、あなたが提供されたサンプルの違いは何ですか? –

+0

サイズの変更時に段落に大きな違いが表示されます。新しい行の開始点は、最初のフィドルのアイコンの後ろにあり、2番目のフィドルのアイコンの真下です。 :) – Frits

答えて

3

更新このコードあなたのインラインスタイルであなたの問題を解決

<div class="linkitem" id="myTools" style= 
    "display:inline-block; padding:4px 0 4px 0; width:90%;"> 
     <a href="{$ItemEditURL}" id="InlineEditLink" style= 
     "cursor: pointer;position: absolute;float:left;width:20px;"><img height="14" 
     src= 
     "https://maxcdn.icons8.com/Android_L/PNG/24/Programming/edit_property-24.png" 
     title="Edit" width="14"></a> <a href="{$SafeLinkUrl}" style= 
     "color: white !important!;float:left;margin-left: 20px;" target="_blank" title="{@LinkToolTip}">A 
     very long descriptive Link text goes here</a> 
    </div> 
    <div class="wrapperArrow" style="float:right; padding-top:5px;"><img alt="" 
    src= 
    "https://maxcdn.icons8.com/windows10/PNG/16/Arrows/double_right-16.png"></div><br> 

    <br><br><br><br><br><br><br> 
    <hr> 
    Free Icons provided by <a href="https://icons8.com">Icons8</a> 
+1

_explain_に時間をかけて問題が何であり、ソリューションがなぜ機能するのかをご確認ください。コードのみの回答は一般的に有用ではなく、投票することができます。 – andyb

関連する問題