"Fokke Nauta" <> wrote in message
news:...
> "Jonathan N. Little" <> wrote in message
> news:ihni83$p4f$...
>> Fokke Nauta wrote:
>>> "Jonathan N. Little"<> wrote in message
>>> news:ihn849$hcg$...
>>>> Fokke Nauta wrote:
>>>>
>>>>> centered: horizontally;
>>>>
>>>> There is not CSS property "centered". For list of valid properties
>>>> supported my most browsers currently:
>>>>
>>>> http://www.w3.org/TR/CSS2/propidx.html
>>>>
>>>> --
>>>> Take care,
>>>>
>>>> Jonathan
>>>
>>> OK, so it may be undocumented but it works in all browsers I tested.
>>> Thanks for the link BTW, I bookmarked it.
>>>
>>> But what's wrong with it as long as it works?
>>
>>
>> But it does *not* work. There is no such property. Invalid css rules are
>> ignored.
>>
>> .container {
>> background-image: url(main.jpg);
>> position: relative;
>> height: 525px;
>> width: 980px;
>>
>> margin-left: auto; <-- These two rules are actually doing
>> margin-right: auto; <-- the horizonal centering of container
>>
>> centered: horizontally; <-- These two rules are actually doing
>> centered: vertically; <-- nothing because they are ignored.
>> }
>>
>> I can prove it:
>>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
>> "http://www.w3.org/TR/html4/strict.dtd">
>> <html>
>> <head>
>>
>> <title>Proof</title>
>>
>> <style type="text/css">
>>
>> .valid { background: #efe; margin: auto; }
>> .invalid { background: #fee; centered: horizontally; centered:
>> vertically; }
>> div { padding: .5em; width: 10em; height: 5em; }
>>
>> </style>
>>
>> </head>
>> <body>
>>
>> <div class="valid">I am centered horizontally</div>
>>
>> <div class="invalid">I am not centered!</div>
>>
>> </body>
>> </html>
>>
>>
>
> Thanks, I have seen it.
> I have left out the invalid "centered" properties and now use margin:
> auto;.
> That does the trick.
>
> I assume it is not possible to center it vertically as well?
>
Take a look here:
http://www.jakpsatweb.cz/css/css-ver...-solution.html
maybe it's good, maybe not, I just found it on google and it seems promising
on first read.