Re: Aligning linked image

  •  03-15-2010, 10:41 AM

    Re: Aligning linked image

    I have followed your steps and encountered the following:
     
    Step 1. Select an image (I click an image in the editor)
    Step 2. Create a link (with the image selected, I click the Insert Hyperlink button)
    Step 3. Click the align button ...
     
    At this point the cursor is placed after the image. Clicking an alignment at this point aligns the surrounding <p> tag. Selecting the image again then selecting an alignment works as stated except for Center, which I know doesn't work for <img> so the image must be wrapped in a block element with the alignment set to center. This is the point where the problem occurs. The image is already wrapped in an anchor tag but then only immediately wrapped in a <div> which causes the anchor to fail.
     
    <a href="ee"><div align="center"><img src="http://cutesoft.net/Uploads/j0262681.jpg" width="80" height="53"  alt="" /></div></a> 
     
    Is it possible to test if the image is wrapped in an anchor tag and then wrap that in a centered element?
    <div align="center"><a href="ee"><img src="http://cutesoft.net/Uploads/j0262681.jpg" width="80" height="53"  alt="" /></a></div>
     
    Or is there another method of centering a linked image that is equally simple?
View Complete Thread