Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
|
|
Absolute Center??Possible with CSS?? |
Page: 1 | Reply |
Jan 20th 2004 | #138617 Report |
Member since: Dec 4th 2001 Posts: 171 |
I am trying to have my website in the dead middle of the web page. I was wondering,should I look into CSS on how to do this?? Or someting like javascript?
|
Reply with Quote Reply |
Jan 20th 2004 | #138635 Report |
Member since: Mar 18th 2001 Posts: 6632 |
http://tom.me.uk/html-to-css/center-vertically.html http://vmalek.murphy.cz/ http://www.mezzoblue.com/tests/centered-css/ For future reference bookmark this site: http://www.9rules.com/cssvault/ |
Reply with Quote Reply |
Jan 21st 2004 | #138712 Report |
Member since: Mar 29th 2003 Posts: 1326 |
I'm sure all those links tell you how to do it, but its really a lot simpler then a lot of those sites make it out to be (as with a lot of things in CSS IMO). Just go... [code] body { text-align: center; } /* for it to work in IE */ #centered_div { margin-left: auto; margin-right: auto; text-align: left; } /*for it to work in other browsers - and to recover from the previous text-align: center */ [/code] ...and it should work in most browsers I think. Thats what I do, anyways. Check out this link, too: http://dorward.me.uk/www/centre/ Good luck! |
Reply with Quote Reply |
Jan 21st 2004 | #138715 Report |
Member since: Nov 26th 2001 Posts: 2586 |
I think the main difference is those other centering div's have been tested on older IE and Netscape browsers.
|
Reply with Quote Reply |
Jan 21st 2004 | #138717 Report |
Member since: Mar 18th 2001 Posts: 6632 |
He's wanting to center it vertically and horizontally the way I understood it, trhaynes. I could be wrong though. Many times the reason CSS is more complicated than it should be is just to get it to work with IE though. |
Reply with Quote Reply |
Jan 21st 2004 | #138719 Report |
Member since: Mar 29th 2003 Posts: 1326 |
Oh yeah, I was just reading over your question again and I noticed that you said "absolute center" as in vertically, too. My example won't do that. Sorry for misunderstanding your query :D
|
Reply with Quote Reply |
Jan 21st 2004 | #138822 Report |
Member since: Mar 18th 2001 Posts: 6632 |
|
Reply with Quote Reply |
Jan 22nd 2004 | #138914 Report |
Member since: Dec 4th 2001 Posts: 171 |
Thanks alot guys!!
|
Reply with Quote Reply |
Page: 1 | Back to top |
Please login or register above to post in this forum |
© Web Media Network Limited. All rights reserved. No part of this website may be reproduced without written permission. Photoshop is a registered trademark of Adobe Inc.. TeamPhotoshop.com is not associated in any way with Adobe, nor is an offical Photoshop website. |