Re: Shrink to fit

On Sep 26, 2009, at 2:46 AM, Eduard Pascual wrote:

> The link, again, is http://abc-jitkasplayground.com/. The relevant
> part of the page is the dropdown menu below the logo. These is what
> the client and artist asked for:
> 1) The menu should be centered. This wasn't entirely achieved: it gets
> close to centered for wider viewports, but it had to use approximate
> sizes to avoid breaking when a replacement font is used.
> 2) When the viewport is resized to be narrower than the full menu, the
> menu should break into multiple lines, but it should be still be
> centered (this is, the remaining h-space after sending enough elements
> down to new lines should be equally split among both sides).
> 3) It shouldn't use javascript to solve this. Not very rational, but
> go try to explain a non-expert client that javascript compatibility
> issues are a ghost from the past and easily avoided with sane
> scripting practices and careful fallback. At the end of the day, it's
> the client who pays the bills ^^;
>
> With a "shrink-more-to-actually-fit" feature, this could have been
> done via inline blocks, absolute positioning for the submenus, and
> display:none vs. display:whatever based on :hover state. Without such
> a feature, it turned out to be impossible to implement. Maybe using
> inline blocks instead of the floats trick could have made 1) work, but
> 2) is currently unachievable without script.

I don't understand why this couldn't have been accomplished with  
inline-block elements inside a text-align:center element.

Received on Saturday, 26 September 2009 17:39:38 UTC