|
Posted by fred.haab@gmail.com on 06/01/06 19:36
mbstevens wrote:
> I don't understand what you really want.
> Text within an <li> does wrap only when it reaches the width of its
> container (the <ul>). If you're
> using the <ul> as the center column, the text will expand and contract.
> The text within the <li> will wrap at whatever size the <ul> is.
Why should it wrap unless it HAS to wrap because you've run out of
screen space? You're making it wrap simply because the container it's
in is fixed in size. There isn't, and wasn't, ever some condition that
there was no container wrapping the list, so I'm sorry if I somehow
gave that impression.
>
> ______________________________
> It would be much easier to understand exactly what your problem is if
> you would put up a couple of pages, one tables, one CSS, that
> demonstrate your problem.
> ________________________________
http://frhaab.home.comcast.net/test/prob2.html
The page is self explanatory. The result, as I see it, is that the
table gracefully handles not only resizing the page, but the font as
well. That is, the table will grow horizontally as much as possible
before wrapping when you increase the font size. By giving a specific
width to a div (even if it's relative), you are forcing those list
items to wrap even if there's enough horizontal space to handle the
increased font size.
I use both fixed and relative div sizes to show the problem. The fixed
size more gracefully handles resizing the window - it remains
relatively centered. However, even with huge amounts of horizontal
space, it will wrap text when you increase the font size too much.
The relative width div is slightly better when you make the window
excessively wide, you can increase the font size a lot - but ONLY if
you increase the window width a LOT... and if you leave the font alone,
increasing the window width makes the actual list become more and more
uncentered (to the left).
> There is another method than the one I mentioned in the previous post.
> If you can drop this no-container requirement you just center one
> container within another with the auto-width margins method of centering.
>
> #outer_container {
> text-align:center;
> }
>
> #contained_container{
> margin:0px auto;
> text-align:left;
> }
Yes, of course - this is exactly what I want... the problem is that the
default box size is 100% width... so a sub container (div within a div,
or even a ul within a div), with no other specifications, is also going
to be 100% width...
In other words, the margin trick doesn't work unless you specify a
width somewhere along the lines.... if I'm mistaken, please let me
know, because that's the cruxt of the problem! Centering images, for
example, is a piece of cake!
Now, I know it seems like I'm really reaching to try to disprove the
philosphy that divs can be used anywhere tables can - but I really,
actually, honestly ran into this today... I just wanted a small list of
options for my users... the page is very simple - the title of the page
and some options.
[Back to original message]
|