[thelist] Suckerfish tabs disappearing off screen

Will willthemoor at gmail.com
Tue Sep 30 02:13:28 CDT 2008


In general, I'd say fixing this with js is going to be *fraught with peril*.
egad. If it were up to me (and it rarely is) the best solution would be to
adjust the design so that list items could wrap or some clever visual
accomodation.

A rough sketch of a js solution might look like this (not tried)
get the window width
get the top left position of clicked element
get the width of your subnav
subtract click position from window width
if the available width is less than the width of your subnav, change a class
on your subnav to position it right

jQuery dimensions plugin should make this a snap.   Of course, I'm probably
forgetting 40 things to make this actually work... :)

There are probably better ways to do this with js but that's how I'd go at
it if I had to resort to js.

Will


On Mon, Sep 29, 2008 at 4:07 PM, Chris Price <chris.price at choctaw.co.uk>wrote:

> Hi
>
> Has anyone implemented Suckerfish drop downs and overcome the problem of
> menu items extending beyond the browser window.
>
> I have a horizontal menu system where the submenues extend to the right
> which is OK up to the far right items. I am thinking there is a
> javascript solution could force the tabs to extend left when there is no
> room on the right - probably a combination of browser width, mouse
> position and tab width.
>
> I've tried searching for the solution but I'm not finding what I'm
> looking for and I need a one fairly quickly.
> --
>
> Kind Regards
>
>
>  Chris Price
>  Choctaw
>
> chris.price at choctaw.co.uk <mailto:chris.price at choctaw.co.uk>
> www.choctaw.co.uk <http://www.choctaw.co.uk>
>
> Tel. 01524 825 245
> Mob. 0777 451 4488
>
> Beauty is in the Eye of the Beholder while
> Excellence is in the Hand of the Professional
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>  >> Sent on behalf of Choctaw Media Ltd <<
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Choctaw Media Limited is a company registered in
> England and Wales with company number 04627649
>
> Registered Office: Lonsdale Partners, Priory Close,
> St Mary's Gate, Lancaster LA1 1XB • United Kingdom
>
>
> --
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>



More information about the thelist mailing list