I have the following code: what i want is using css put the ‘MYIMAGE’ on the most right side. alt text http://igurr.com/resized-image.ashx/__size/500×400/__key/CommunityServer.Components.PostAttachments/00.00.00.01.73/OneContact.JPG
<div style='cursor: pointer;' onclick='javascript:SelectContact('17');' onmouseover='javascript:this.className='onfocus';' onmouseout='javascript:this.className='tempClass';' id='contact_17' class='tempClass'> <input type='checkbox' class='contactChk contactItem' id='chk_17' name='chkContact' onclick='javascript:alert('clicked');'/> <img height='25' width='25' class='contactItem' src='Images/Contacts/NoImage.gif' alt=''/> <span class='contactName' id='contactName_17'> Amr ElGarhy </span> <img id='MYIMAGE' src='Images/Common/Motiva.png' alt='' class='contactItem'/> <br/> </div>
CSS:
.contactChk { margin-left:10px; } .contactItem { display:inline; vertical-align:middle; } .contactName { display:inline; vertical-align:middle; }
An alternative is to use absolute positioning.
If #contact_17 is position:relative, you can set #MYIMAGE to position:absolute and set its ‘right’ property to 0 (or however far from the right edge you desire). Absolute positioning will ignore anything else in the div, though, so if you do that be sure to set the rest of the contents to not overlap.