![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Hello, I'm sure this has been asked numerous times before - but none of the solutions I have found seem to work for me. I want a page width, say 500px, centered within the browser's window. Here's the HTML: div id="container" div id="sidebar" Side bar text /div div id="mainContent" Main content text /div /div #container { border:1px solid #000; text-align: left; width: 500px; margin-left: auto; margin-right: auto; } Any ideas why this isn't working - the examples I've seen say it should - IE most recent version (the one without the menu so I've no idea hot to find out what version it is - 7?). |
#2
| |||
| |||
|
|
In article b4cacd25-9660-44b9-9a38-998898d9e... (AT) l32g2000hse (DOT) googlegroups.co m>, rbrowning1958<RBrowning1... (AT) gmail (DOT) com> wrote: Hello, I'm sure this has been asked numerous times before - but none of the solutions I have found seem to work for me. I want a page width, say 500px, centered within the browser's window. Here's the HTML: div id="container" div id="sidebar" Side bar text /div div id="mainContent" Main content text /div /div #container { border:1px solid #000; text-align: left; width: 500px; margin-left: auto; margin-right: auto; } Any ideas why this isn't working - the examples I've seen say it should - IE most recent version (the one without the menu so I've no idea hot to find out what version it is - 7?). Use: #container { border:1px solid #000; text-align: center ; width: 500px; margin-left: auto; margin-right: auto; } #sidebar {text-align: left;} #mainContent {text-align: left;} (if you want left text in the inner children, that is...) -- dorayme- Hide quoted text - - Show quoted text - |
#3
| |||
| |||
|
|
On Dec 18, 5:21 am, dorayme <doraymeRidT... (AT) optusnet (DOT) com.au> wrote: In article b4cacd25-9660-44b9-9a38-998898d9e... (AT) l32g2000hse (DOT) googlegroups.co m>, Hello and thanks for that. I have tried similar things but they didn't work and neither did yours. I've think I've found my issue though. I'm guessing my browser was working in quirk mode where I guess this centering didn't work. If I change my doctype to strict it works fine. I'm guessing though this might not work so well with other browsers - is your text-align center in the container to do with older browsers? |
#4
| |||
| |||
|
|
Are you saying that http://netweaver.com.au/alt/browning.html fails to centre in some browser you are using. Which one please? |
#5
| |||
| |||
|
|
"dorayme" <doraymeRidThis (AT) optusnet (DOT) com.au> wrote in message news:doraymeRidThis-C1D0FD.18091818122007 (AT) news-vip (DOT) optusnet.com.au... Are you saying that http://netweaver.com.au/alt/browning.html fails to centre in some browser you are using. Which one please? IE 5.01, IE 5.5 :-) |
#6
| |||
| |||
|
|
In article 68a061e2-ac30-4dd2-9803-61efc4cb0... (AT) e25g2000prg (DOT) googlegroups.co m>, rbrowning1958<RBrowning1... (AT) gmail (DOT) com> wrote: On Dec 18, 5:21 am, dorayme <doraymeRidT... (AT) optusnet (DOT) com.au> wrote: In article b4cacd25-9660-44b9-9a38-998898d9e... (AT) l32g2000hse (DOT) googlegroups.co m>, Hello and thanks for that. I have tried similar things but they didn't work and neither did yours. I've think I've found my issue though. I'm guessing my browser was working in quirk mode where I guess this centering didn't work. If I change my doctype to strict it works fine. I'm guessing though this might not work so well with other browsers - is your text-align center in the container to do with older browsers? Are you saying that http://netweaver.com.au/alt/browning.html fails to centre in some browser you are using. Which one please? -- dorayme |
![]() |
| Thread Tools | |
| Display Modes | |
| |