Hi Mark,

I ran into a similar problem about a year ago. I needed to build a
horizontal nav bar that was variable in width depending on the number
of menu options. Some users with admin privilege had more menu options
than regular users so their menu bar would be wider. Since I did not
know exactly how wide the bar would be I could not give it a fixed
width. I tried various ideas, none of which I could get to work across
all browsers. I may be wrong, but I think the only solution that works
across all browsers is to use a table as the containing element. I'm
against tables for layout purposes so I chose instead to work around
the problem by making the nav menu a fixed width and displaying all
the menu choices and just "toggling off" the choices that the user was
not allowed to select.

Someone please correct me if I am wrong, but I think those are your
two best choices: table or work around the problem other method.



HTH,

- Ben

On 10/31/06, Mark Wheeler <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Is this even possible? (I'm sure it is, but I still feel pretty new
> to css) - Can you have a div (content) centered inside another div
> (container) BUT, the content div's width may be different because of
> content (thus you can't set the width) AND the div width must
> collapse around the content (so if a border was used, it would
> collapse around the content)? I can't figure this out. I'm sure there
> is a simple solution, but I can't seem to get there. Any help would
> be appreciative.
>
> Thanks,
>
> Mark
> ______________________________________________________________________
> css-discuss [EMAIL PROTECTED]
> http://www.css-discuss.org/mailman/listinfo/css-d
> IE7 information -- http://css-discuss.incutio.com/?page=IE7
> List wiki/FAQ -- http://css-discuss.incutio.com/
> Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
>
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to