W3C home > Mailing lists > Public > www-style@w3.org > September 2009

Re: Shrink to fit

From: Brad Kemper <brad.kemper@gmail.com>
Date: Sat, 26 Sep 2009 10:38:48 -0700
Cc: Alex Mogilevsky <alexmog@microsoft.com>, "L. David Baron" <dbaron@dbaron.org>, "www-style@w3.org" <www-style@w3.org>
Message-Id: <52DE94E0-3791-4FD7-826B-1497AD7FF210@gmail.com>
To: Eduard Pascual <herenvardo@gmail.com>

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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:21 GMT