You are here: Re: Why is vertical centering such a pain in the ass? « HTML « IT news, forums, messages
Re: Why is vertical centering such a pain in the ass?

Posted by Ben C on 05/17/07 16:51

On 2007-05-17, Ciaran <cronoklee@hotmail.com> wrote:
>
>> Does this help you?http://www.student.oulu.fi/~laurirai/www/css/middle/
>>
>
> Not really John but thanks for the reply. I've seen that page before
> and tried all those things on the code snippet above but nothing
> works. I'm more interested in why it has to be so complicated than
> finding a solution to that problem. I mean I can do it with an extra
> bit of markup if I need to but I'm digging my heels in here. It should
> not be this messy to do something so simple.

It's true they could have provided some way to vertically centre an
absolutely positioned box while letting it have a height based on
content. A small change to section 10.6.4 paragraph 3 is all it would
take.

If you allow vertical centering everywhere things do start to get
complex, particularly if the vertically centered text is flowing around
floats that start in nearby blocks, since those would affect its height,
which would affect its position (because it's centered), which means it
now flows differently around the floats, affecting its height, which
would affect its position... What are the chances of IE ever getting
something like that right? Better not to set the bar too high.

But it's not often that vertical centering is particularly useful I
think since everything tends to flow downwards off the bottom of the
viewport anyway.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация