View Single Post

Member Since: Sep 04, 2009
Location: London
Posts: 11
bexxy is on a distinguished road
Mac Specs: iMac, iPhone, iPod

bexxy is offline
I might be an idiot (I often am!) but I encountered the same trouble recently and tried this which seemed to work a dream. As gomez1018 says you will need to use a parent div to centre the whole image and then put the splices into this.....


<div style="width:100px; height:100px; position:absolute;top:50%;left:50%;margin-top:-50px;margin-left:-50px;"></div>

So: adjust the width and height to whatever the complete image you have is. Leave the top and left thingies at 50%. However, what this means is that you are asking the top left corner of the div to be bang in the centre of the browser.... not what you're wanting I think. So then the margin-top and margin-left things come in...... in the above they are at -50px as the whole image is 100 x 100 px so if they are both placed at -50px it will centre it. Obviously if your image is 250 px wide you will change that value to -175px. Once you've got that container div sorted you can insert others into it......

Hope that helps - I'm not very good at explaining but if you think it looks like the type of thing you are after let me know and I'll give you the address of a site that I did which uses this....

All the best
QUOTE Thanks