|
|
|
| Hi
Margin: auto doesn't seem to work in IE.
Is there another way to have a <div> smaller than the screen to be centered
for any scr.width ?
Like <table align="center"> does.
Thanks
| |
|
| Bill wrote:
> Margin: auto doesn't seem to work in IE.
>
> Is there another way to have a <div> smaller than the screen to be centered
> for any scr.width ?
> Like <table align="center"> does.
http://locusmeus.com/html-css/centeringpage.html
The reason your IE doesn't respond to auto:margin, is probably that
you don't have a complete doctype. Means it will be in Quirksmode, (as
opposed to standards mode), just like IE5 naturally is.
The above link shows how to deal with IE5, and that should work for
IE6 in Quirksmode too.
--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Extreme - Color Me Blind
| |
|
|
| sschling@gmail.com 2005-09-21, 7:34 pm |
| css:
#container {
margin: 0 auto;
width: 760px;
}
html:
<div id="container">
hello
</div>
If you have the correct doctype as Els mentioned, this should work
| |
|
| Thanks to you all
<doctype > did the work
| |
| Jim Moe 2005-09-21, 7:34 pm |
| Bill wrote:
>
> Margin: auto doesn't seem to work in IE.
>
You must also set a width less than 100%.
--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
|
|
|
|
| Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |