glenelkins Posted March 29, 2007 Share Posted March 29, 2007 Hi Ok this is really starting to get on my wick! I have a style sheet setup as follows body { margin-top: 0px; margin-left: 0px; margin-right: 0px; margin-bottom: 0px; text-align: center; font-family: Verdana,Arial,serif; font-size: 10pt; } #main { position: absolute; top: 0px; left: 0px; width: 1024; height: 100%; } #header { position: relative; top: 0px; left: 0px; width: 1024px; height: 148px; } #navbar { position: relative; top: 0px; left: 0px; width: 1024px; height: 35px; } #login_join { position: absolute; top: 10px; left: 10px; } #main_body { position:relative; top: 0px; left: 0px; width: 1024px; height: 100%; } #tabs { position: absolute; top: 148px; left: 0px; width: 1024px; height: 30px; text-align: center; } #content { position: absolute; top: 200px; left: 0px; width: 1024px; height: 100%; text-align:center; } h1 { font-size: 12pt; font-weight: bold; } a { color: #000000; text-decoration: none; } a:hover { color: #00000; text-decoration: underline; } .title1 { font-weight: bold; font-size: 10pt; } .title2 { font-size: 8pt; color: #000080; } .text1 { font-size: 8pt; } #latest_news_title { position: absolute; top: 19px; left: 115px; color: #000000; font-weight: bold; } all is well and good! Everything lines up like it should bla bla... now , my client wants the whole thing in the middle of the screen. Ok, so i thought id put <div align="center"></div> around everything...did it work? NO! i tried setting up a new tag #outer which aligned the content to centre, did it work? NO! Any ideas? Its really doing my head in Quote Link to comment https://forums.phpfreaks.com/topic/44783-centre-on-the-screen/ Share on other sites More sharing options...
lando Posted March 29, 2007 Share Posted March 29, 2007 I'll assume you are talking about this site? If so, on #main you need to remove position: absolute; and give it margin: 0 auto; When I did this it messed up some other elements within the site. This is being caused because you have assigned several elements position: absolute;, you will need to remove those. Quote Link to comment https://forums.phpfreaks.com/topic/44783-centre-on-the-screen/#findComment-217456 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.