View Full Version : Trying to normalize text width within variable-width container

Mar 17th, 2011, 07:39 AM
I set a min-width and max-width (and ie6 hack) for the container box that holds my navigation, images and text. When I reduce my browser window size to test it, everything responds as expected except the article text (#article in the style sheet), which acts like it has fixed width. I've monkeyed with this code so much that it may look like a mess when you check it ...

Mar 17th, 2011, 10:50 AM
Just a thought. Have you tried this.

{ text-align: justify; }

Probably not relevant but easy to try.


Mar 17th, 2011, 06:24 PM
Hello okieman,
Your #main has a min-width of 800px but your two floats inside are seen as 900px wide.
Instead of that min/max width on a child element, does this work? -

#article {margin: 0 30px 0 290px;}
#navigate {display: inline;}

Mar 18th, 2011, 03:46 AM
That causes the article text to drop down below the nav panel. I tried changing the display on #article from inline to block but it had no effect. Still tinkering. What do you thing is causing the drop down?

Mar 18th, 2011, 04:01 AM
Well, I had to comment out the margins suggestion and change #article to a fixed width. This NOT what I want, but it's a temporary fix until I have better understanding of elastic layout methods. Back to the drawing boards. Very frustrating. I really need for this site to adjust to different window sizes and resolutions.

Mar 18th, 2011, 05:19 AM
What do you thing is causing the drop down?

You had display: inline; on #article from 2 different places in your CSS.

Mar 19th, 2011, 07:01 AM
I was using to many different suggestions from others or my own guesses without making sure I understood the code by looking it up in my Eric Meyer book. Short answer: working too fast causes errors.