I assume parent div element has style "padding". Try code below,
<DIV class=content_mid style="padding:0px!important">
题
I would like to know how to align an img
to the right edge within a <DIV></DIV>
element.
I've been using the following code:
<DIV class=content_mid><img alt="" style="float:right; margin:0px; padding:0px; border:0px; right:0px;" align="right" src=".../img_name.png"></DIV>
But there is still a bit of space between the image and the right edge of the DIV.
Another note: I'm using a CMS for this, so I don't have access to the CSS. It needs to be done through HTML.
I've also used position:relative;
, which hasn't worked for me either.
Any help would be greatly appreciated.
Thanks,
解决方案
I assume parent div element has style "padding". Try code below,
<DIV class=content_mid style="padding:0px!important">