Some CSS help to centralises an variably sized image with no effect on surrounding divs.
Posted on 2011-09-05
I am creating a dynamic front cover for a report as part of a web application. The front cover has:
a) A Title
b) A centralised image which can be any size.
c) Right, bottom aligned text block containing name and address details.
I need the image layer to take any size of image without it impacting the other text blocks. So I guess I need the image layer to be central to the page and it to be on top of the other divs.
So I guess I will have the following:
<div id="title">My Title</div>
<div id="Image" style="position:absolute;z-index:100.... centralise css ??? etc etc"><img src.../></div>
<div id="AddressBlock" style="bottom, right ???>Address data....</div>
Thanks for any help,