Reply to Re: center/shrink to fit redux.

Your name:

Reply:


Posted by fred.haab@gmail.com on 06/01/06 17:31

mbstevens wrote:
> fred.haab@gmail.com wrote:
>
> > So the "requirement" is that the UL block itself is centered AS A
> > WHOLE.
>
>
> > <p>List Title:</p>
>
> No. Use <hx>...</hx>

Well, that's just nit-picking. I want the font to be the same.

>
> > <ul>
> > <li>Item 1.</li>
> > <li>Item two is a lot longer.</li>
> > <li>Item three is, also.</li>
> > </ul>
> > .............
> > Shouldn't there be a "float: center"?
> > .............
>
>
> A center column is sometimes handled by setting the left and right
> columns to the same percentage, leaving the center column the remainder
> of the alloted space.

Yes, I know - I explained that in the original post, and I don't
necessarily need "pixel perfect" (in fact, I don't expect it at all).
The problem is that it should work on any reasonable window resolution
(640 on up). In fact, I've done three columns with divs and CSS, and
it all works just fine for that content.

But let's say I write this for the lowest common denominator (640,
although I think 800 is more reasonable these days), and say "with the
given font and so forth, the UL takes up just under 50% of the page, so
if I set right and left columns (or margins) to take up 25% each, it
looks fine."

Then the user uses a 1024 or 1280 window. Now, the box is still
centered, but it's bigger - much bigger. The content in the box is
left justified to make the bullets line up. Now there is a big empty
space on the right side of the box using this technique.

If I fix the width of the box, then there is a problem when users
resize the font - the width of the container should expand up to the
maximum it can before text starts wrapping.

The only way I can see handle both cases - staying reasonably centered
regardless of window width AND staying centered and expanding the width
of the container a reasonable amount when the user selects a larger
font size is to use tables.

Don't get me wrong, I'm not trolling and trying to reignite the debate.
I used to use tables for layout all the time, now I'm using CSS, and
all my new stuff uses CSS and is run through validators and everything
- and if I'm not supposed to use tables for presentation, that's
fine... but I am thinking I will do so in cases like these because CSS
simply does not offer the functionality I want. The fact of the matter
is that "centered" might be deprecated (as well as "align=centered"),
which is fine - but CSS has not offered a BETTER alternative, it only
offered AN alternative.

I want to be proven wrong - I'm not expert, but I'm pretty old school
about it - the user should have as much flexibility as possible.
Fixing the width of websites is not a good alternative - it's merely AN
alternative just so people can get away without using tables so other
developers don't mock their html.

So I'm leaving it plain for now (not centered), and I'm hoping that
someone will tell me it's possible to center an arbitrary sized
(dependent on the content) container.

[Back to original 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

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