You are here: Re: center/shrink to fit redux. « HTML « IT news, forums, messages
Re: center/shrink to fit redux.

Posted by fred.haab@gmail.com on 06/02/06 14:35

mbstevens wrote:

> This seems to perform better than the CSS examples that fred.habb gave.
> It should be no problem to take a test of the text length for server
> side generated pages, too, and spit out corrected CSS with the page. He
> mentioned generating the things with javascript, too, I believe. All I
> can say is -- horrors!

That's because I'm the one asking how to do it a good way... those
examples were examples of why the margin: auto technique don't work
well... they weren't examples of a good way to do it.

And I did mention JavaScript... and I do agree it would be horrible,
and said as much (using JavaScript would be a worse solution,
basically).

Yes, "em" is a better unit of measurement in this case, and it's
certainly possible to have any PHP (for example) specify the correct
value on the fly... it'd still be nice to have something that works
intuitively. margin: auto is intuitive when you think about it, it's
just there should be some way to have the bounding box shrink to the
minimum size to contain the content.

I mean, that's why images work so well... the box size IS the image
size, so setting the margins to auto always perfectly centers the
image. Floating text reduces the bounding box to just fit the
content... so they really should include something like "float:
center", or "width: minimum" along with "margin: auto" would work.

 

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

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