vinods, on 01 March 2011 - 11:19 AM, said:
<html>
<head><title></title></head>
<body>
<table border=1><tr><center><img src=""></center></tr>
</table>
</body>
</html>
use the above code to display the image in center position in the table.
the best way to do it is to have the div#mainWRAP margin left & right to auto. but you must specify the width of the intended website(#mainWRAP) else it wont work.
have the #mainWRAP as the main container to place all codes in it.
but if you want to individually centered an image you have to put a div inside a div and set the outer div to relative position with height and width specified and set the inner div to absolute position with again the width and height as well and set in the absolute left position to 50% and left margin to half of the size of the inner div eg. inner div width is 500px so you set it to -250px. do the same for vertical centering if need be.
goodluck!
p/s: to move the outer div around the page, use the top & left of relative positioning.