Topic: Central alignment on screen Pages that link to <a href="https://ozoneasylum.com/backlink?for=21786" title="Pages that link to Topic: Central alignment on screen" rel="nofollow" >Topic: Central alignment on screen\

 
Author Thread
templar654
Bipolar (III) Inmate

From: Aiur, the Tarsonian Galaxy
Insane since: Apr 2004

IP logged posted posted 05-13-2004 14:11 Edit Quote

I've been trying to central align my site using CSS. I want the main container div to be central aligned on the screen. So far I couldn't get it done. If I use margin then it just sits there. Can anyone tell me how to do this properly??


Online Portfolio

Blaise
Nervous Wreck (II) Inmate

From:
Insane since: Jun 2003

IP logged posted posted 05-13-2004 14:53 Edit Quote

I'm pretty sure there are some issues with cross-browser compatability with this.

IE doesn't understand margin: auto; properly and Moz won't text-align: center; a div, so you'll need to use both.

Not sure of the exact syntax, but it's something like this (I think)

code:
body{
text-align-center;
}

#container{
width: 700px;
text-align: left;
margin-left: auto;
margin-right: auto;
}

Hope that helps!

Cheers,

Blaise

(Edited by Blaise on 05-13-2004 14:54)

templar654
Bipolar (III) Inmate

From: Aiur, the Tarsonian Galaxy
Insane since: Apr 2004

IP logged posted posted 05-14-2004 09:06 Edit Quote

Yo thanks man that did it.


Online Portfolio



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu