Sariksa Thapa Sariksa Thapa - 6 months ago 25
HTML Question

justify link text following an image icon when it wraps

I have a link with link icon on the left, and an arrow to the right. What I am having problem with is as the link text wraps, it doesn't justify very well. How can I achieve something like here http://jsfiddle.net/MrLister/3xbfyqkh/, but with my given markup?

<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>


My fiddle here...
https://jsfiddle.net/a2gruae6/

Answer

Update this code in your inline style as solve your problem

<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>