I know I believe I’ve done this before I’m using position: absolute for a div 1000px wide then giving it a margin of auto to center it but it doesnt center it.
The div is the Steve div with the illustration in it, I’m trying to get it so the whole div is centered but doesnt seem to work, I’m sure I’m missing something minor, cant just think of it right now.
If you roll over the Illustration Speech bubble pops up, is it possible to make the speech bubble visible first using the way I did it, maybe just for 5 seconds or something then go away then come up everytime you rollover the illustration. Also I have the triangle at the bottom of the speech bubble is it possible to position it on the side of the speech bubble instead of the bottom.
Actually Ray auto margins will center absolute elements as long as they have a width defined and are also left:0 and right:0 and then auto margins will work.
People used to think that auto margins didn’t work on absolute elements because IE7 and under got it wrong but was fixed in IE8+. Other browsers have always centred using auto margins as long as width and left:0 and right:0 are also defined.
Yes most people don’t know about it because IE7 and under never supported it and therefore did not come into common use. However these days it can be used now that ie7 support is low and avoids the element sliding off the page when the negative margin technique is used on a fluid page wrapper.