Log in

View Full Version : aligning image in correct place



hemi519
11-16-2010, 06:09 PM
Hi All,

In a td how can i place any image at an exact place i required.(Valign=top,bottom,center) Using these wont solve my problem i want my image between center and bottom of my TD. How can i get it!!!!!!!!!!!

Beverleyh
11-16-2010, 06:34 PM
You can actually do a number of things;

1 - you could cheat and edit the image to add extra height or width onto the physical dimensions.

2 - you could add margins to the img tag to push the image away from the walls of the containing cell -
<img src=images/pic.jpg" alt="pic" style="margin-top:15px; margin-left:25px;" />

3 - you could add an image as a background to the table cell -
<td style="background:url('images/pic.jpg') 15px 25px no-repeat; width:175px; height:80px;">&nbsp;</td>

One of these should suit your circumstances but its up to you to decide.

hemi519
11-16-2010, 06:43 PM
once again thanks

Beverleyh
11-16-2010, 06:56 PM
No problem - personally I prefer the 2nd option :)

hemi519
11-16-2010, 07:03 PM
myself also went with second option and solved my issue