[css-d] best way to center a image vertical and horizontal in window

2006-09-27 Thread Sander van Surksum
I've seen some tricks to display an image horizontal and vertical centered on a page. But they al have some problems. The way I use the most is body { margin: 0; padding: 0; background-color: #00; } #container { margin: 25% auto; text-align: center; } div id=container a

Re: [css-d] best way to center a image vertical and horizontal in window

2006-09-27 Thread Gunlaug Sørtun
Sander van Surksum wrote: Is there a way that you can display an image right in the middle of the window? If you mean the middle of the browser-window, then yes: using 'position: fixed' - with workarounds for IE6... http://www.gunlaug.no/contents/wd_additions_17.html

Re: [css-d] best way to center a image vertical and horizontal in window

2006-09-27 Thread Bradley Wright
On 27/09/2006 10:12, Sander van Surksum wrote: This is working but still not 100%. Is there a way that you can display an image right in the middle of the window? Try this: Put the image by itself in the page, so: body a href=mailto:[EMAIL PROTECTED] id=mimg src=images/logo.gif