Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8801333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:48:27+00:00 2026-06-14T00:48:27+00:00

I have a fiddle that shows a menu that I build. This is a

  • 0

I have a fiddle that shows a menu that I build.

This is a vertical menu. The problem that I’m having is the more <li>s I add to the menu, the harder it is to fit on the screen.

For example: The top menu item (A) has most of it’s contents that extend above the screen. Imagine if the menu had many items (a, b, c, d …z), the bottom menu item (z) would extend past the bottom of the screen.

To compound my problem, imagine a menu item in the middle of the menu had many elements. This will also extend past the top of the screen. This is not what I want. I’d actually like the menu flyouts to respond to it’s surrounding window and fit itself inside.

I’ve started by telling each group to center itself before it shows itself like so:

var groupList = $(e.target).find('.group-list');
groupList.css({
    'margin-top': (-groupList.height() / 2) + 'px'
});
groupList.show();

Unfortunately this is not enough. However, I’m unsure of how to make each aware of the window around it, and responsive enough to fit itself inside the window.

How can I rewrite my groupList.css({}) code to make the group-list class responsive & fit inside the window?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T00:48:28+00:00Added an answer on June 14, 2026 at 12:48 am

    I would get the total height of a wrapper that is around your full lits items /menu. Then compare it to the variables of something such as the following:

    Var height = $(document).height();  // get document height
    Var width = $( window).width();
    

    Then compare that against your list height at all times. If the height reaches the point at the limit you want, then create a new column and append your list to it. That way it is always resizing and never hanging outside the windows view port.

    You then would create the second box that your pop out list items are in. Compare that to the document height and also set the bottom css to 0px.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My code in this Fiddle shows that I have adjacent elements which vertical margins
This fiddle http://jsfiddle.net/paultrotter50/fdvC5/ shows the problem I am having with detecting the height of
I have this fiddle : http://jsfiddle.net/XjeCf/1/ that works like I want and this one
This fiddle shows a very basic version of the markup I have. I want
My Problem (Fiddle) My problem is that on my jquery animated dropdown menu, when
Fiddle here: http://jsfiddle.net/emJcx/1/ I have a drop down menu that is a simple show
I made this fiddle to show my problem. I have a list and I
I'm having this problem: I have two Google maps in one page, showing just
UPDATED TO ADD FIDDLE: http://jsfiddle.net/wvUqy/6/ I have a page_action in Chrome that parses the
I have this fiddle: http://jsfiddle.net/yub2B/4/ HTML: <input type=text /> <input type=text /> <input type=text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.