...

View Full Version : Aligning an image in the middle of a div



IdentityCrisis
10-02-2004, 03:30 PM
I have a DIV that is a placeholder for various images (dynamically inserted based on page view). The problem is, some of the images are a different size, so I'd like to have the image completely centered (vertically and horizontally in the DIV). How would I go about doing this?

The DIV is always the same size, and it's dimensions are set in the stylesheet for my page...


<style>
#ImageHolder {position: aboslute; .......... width: 277; height: 500;}
</style>

<div id="ImageHolder">
<img src="IMAGEHERE">
</div>

IC

BuddhaMan
10-02-2004, 09:56 PM
http://www.w3.org/Style/Examples/007/center.html



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum