This is a discussion on "Centralising my site" within the Web Page Design section. This forum, and the thread "Centralising my site are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Centralising my site
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Centralising my site
Hey, currently working on a site, heres a shortened version of my code....
<div id="container"> <div id="banner"></div> <div id="middle"></div> <div id="footer"></div> </div> The container is 700 x 700 pixels, how do i centralise the whole thing so it alway appears in the middle of the browser? thanks |
|
|
|
||||
|
Re: Centralising my site
You need margin: 0 auto; in your container div css
|
|
|||
|
Re: Centralising my site
You would want to use this:
Cheers, SWagner
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
|||
|
Re: Centralising my site
AdRock, im already using margin: 0 auto; but it isnt working in ie, its fine in mozilla. In IE the containers about 5 - 10 pixels from the left
|
|
||||
|
Re: Centralising my site
Then post a link so we can see the whole thing!
|
|
|||
|
Re: Centralising my site
Calm down Karinne. It isnt online yet.
|
|
||||
|
Re: Centralising my site
Quote:
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
|||
|
Re: Centralising my site
Alex, he already said it wasn't working with margin:0 auto; that's why I suggested the div align value... But any other (or better) solutions would still be good. Correct me if I'm wrong!
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Last edited by Stuart; Nov 2nd, 2007 at 00:32. |
|
||||
|
Re: Centralising my site
This should definitely work.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
|||
|
Re: Centralising my site
Quote:
If "margin: 0 auto" is failing, it's probably because he's looking at the page with the IE5 layout engine. This engine does not support auto margins. This will happen in IE6, when an incorrect doctype is declared. IE6 will then activate doctype switching, and use the old IE5 layout engine. You can see why it helps to have a link! |
|
|||
|
Re: Centralising my site
OK, I give up. I guess I've been living in the past... Sorry for being deprecated! I did not want to give bad advice, I just did not know that it was deprecated (no one tells me these things!).
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Last edited by Stuart; Nov 2nd, 2007 at 00:41. |
|
|||
|
Re: Centralising my site
Quote:
Now.. everytime I see this kind of problem, I'll copy and paste your technical explaination there for them to read! hehehe.. seriously..! I never knew that, another knowledge from you, I guess
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
||||
|
Re: Centralising my site
Quote:
to see what elements and attributes are deprecated, have a look the W3C site Elements Attributes There's a Depr. column in both those tables. If there's a D, then it's deprecated hth |
|
||||
|
Re: Centralising my site
Have you sorted out the problem yet? If not can you post the code so we can see....you may have missed something which somebody else may pick up?
|
|
|||
|
Re: Centralising my site
Thanks Karinne! Most of those I knew. I just never realized the align elements/attributes were deprecated.
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
|||
|
Re: Centralising my site
Quote:
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| I bring this site up again because, I have no idea how to make this site pull in. | TheSealPortalTeam | Free Web Site Critique | 4 | Jun 10th, 2008 12:46 |
| Uploaded site different from local site | alowe | Web Page Design | 20 | Mar 28th, 2008 02:20 |
| [SOLVED] Centralising a sub-wrap | Madball | Web Page Design | 10 | Nov 6th, 2007 14:43 |
| off-site linking to a particular page in a site made with frames. NEED HELP | vandiermen | Web Page Design | 1 | Aug 6th, 2006 13:30 |
| [req] Free basic web templates site + button design site | slorryy | Web Page Design | 3 | Feb 17th, 2006 17:05 |