|
| |
|
|
J-man
Posts: 936 From: Canada Status: offline
|
center image - 2/10/2006 1:30:48
hey, i would like to use CSS to center an image in the browser window both horizontally and vertically - so when the window is resized it re-centers. Hoping for CSS1 type method having browser compatibility .... suggestions? J-man
< Message edited by J-man -- 2/10/2006 4:57:52 >
|
|
|
|
Kitka
Posts: 2520 Joined: 1/31/2002 From: Australia Status: offline
|
RE: center image - 2/10/2006 6:38:01
http://www.wpdfd.com/editorial/thebox/deadcentre2.html
_____________________________
Kitka **It is impossible to make anything foolproof because fools are so ingenious.**
|
|
|
|
Mane
Posts: 105 Joined: 7/7/2005 Status: offline
|
RE: center image - 2/27/2006 19:52:15
Wow, that's the simplest centering soulution I've ever seen!
|
|
|
|
Tailslide
Posts: 6272 Joined: 5/10/2005 From: Out here on the raggedy edge Status: online
|
RE: center image - 2/28/2006 3:17:27
Here's an unobtrusive Javascript way of doing it: http://www.alistapart.com/d/footers/footer_variation1.html It uses the normal margin:0 auto to centre the box horizontally but it also uses JS to centre the box vertically. With JS switched off you just get the horizontal centering. I quite like this technique because with the Dead Centre version the centred box disappears off screen when the screen is made very small. Anyway - just another method for you to store away for future use!
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|