|
|
|
date: Wed, 06 Feb 2008 20:10:08 +0000,
group: uk.net.web.authoring
back
Is IE really still broken on margin:auto for centering and block
element?
I know IE used not to understand "width=xxx margin=auto" for centering a
block and you had to fudge it with "text-align:center" in an outer
block, with "text-align: left" on the inner block if you didn't want the
contents centred....but I thouigh MS had fixed that long ago, yet today
I found IE7 showing the behaviour.
Is this something to do with "quirks" mode and not having a proper
DOCTYPE declaration? (I have just noticed the page in question didn't
have one, it went straight into <html><head> etc...)
--
Anahata
anahata@treewind.co.uk -+- http://www.treewind.co.uk
Home: 01638 720444 Mob: 07976 263827
date: Wed, 06 Feb 2008 20:10:08 +0000
author: anahata ess
|
Re: Is IE really still broken on margin:auto for centering and block element?
"anahata" <anahata@reply-to.address> wrote in message
news:13qk5112v3i5r78@corp.supernews.com...
>I know IE used not to understand "width=xxx margin=auto" for centering a
>block and you had to fudge it with "text-align:center" in an outer block,
>with "text-align: left" on the inner block if you didn't want the contents
>centred....but I thouigh MS had fixed that long ago, yet today I found IE7
>showing the behaviour.
<div style="width: ---px; margin: auto">
---dE|_---
date: Thu, 07 Feb 2008 00:16:46 GMT
author: dE|_
|
Re: Is IE really still broken on margin:auto for centering and block
element?
On Feb 7, 7:10 am, anahata <anah...@reply-to.address> wrote:
> I know IE used not to understand "width=xxx margin=auto" for centering a
> block and you had to fudge it with "text-align:center" in an outer
> block, with "text-align: left" on the inner block if you didn't want the
> contents centred....but I thouigh MS had fixed that long ago, yet today
> I found IE7 showing the behaviour.
>
> Is this something to do with "quirks" mode and not having a proper
> DOCTYPE declaration? (I have just noticed the page in question didn't
> have one, it went straight into <html><head> etc...)
>
I think you may have just answerd your own question.
BTW not having a doctype will place *all* browsers into quirks mode
from what I know.
--
Regards Chad. http://freewebdesignonline.org
date: Wed, 6 Feb 2008 21:15:57 -0800 (PST)
author: Chaddy2222
|
Re: Is IE really still broken on margin:auto for centering and block
element?
dE|_ wrote:
> "anahata" <anahata@reply-to.address> wrote in message
> news:13qk5112v3i5r78@corp.supernews.com...
>
>>I know IE used not to understand "width=xxx margin=auto"
>
> <div style="width: ---px; margin: auto">
Er, yes, that's what I meant :-)
--
Anahata
anahata@treewind.co.uk -+- http://www.treewind.co.uk
Home: 01638 720444 Mob: 07976 263827
date: Thu, 07 Feb 2008 08:40:55 +0000
author: anahata ess
|
Re: Is IE really still broken on margin:auto for centering and block element?
"anahata" <anahata@reply-to.address> wrote in message
news:13qlh0nhi7ovbd2@corp.supernews.com...
> dE|_ wrote:
>> "anahata" <anahata@reply-to.address> wrote in message
>> news:13qk5112v3i5r78@corp.supernews.com...
>>
>>>I know IE used not to understand "width=xxx margin=auto"
>>
>> <div style="width: ---px; margin: auto">
>
> Er, yes, that's what I meant :-)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Use this then</title>
</head>
<body>
<div style="width: 500px; margin: auto">
This is my default start-up in html-kit and works.
---dE|_---
</div>
</body>
</html>
date: Thu, 07 Feb 2008 11:49:33 GMT
author: dE|_
|
|
|