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 6224267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:38:32+00:00 2026-05-24T08:38:32+00:00

I have a parent div that is filled with multiple child divs (see here

  • 0

I have a parent div that is filled with multiple child divs (see here for what I’m talking about http://garyoak.com/images/MgMenu.png ). I’d like to be able to navigate it with keyboard only, so I was looking for a way to scroll the child divs up or down when the user pushes past the visible elements. I can figure out when the user has done that without a problem, but I’m not sure how to actually scroll the inner divs up/down. I have jquery available and can add extensions to it without a problem. I know of jquery plugins such as scrollable and carousels, however I’m hoping there is a much simpler way to do this.

the html ends up looking like this:

    <div id="MaigcPanels" class="MagicPanels">
        <div id="MagicPanel0" class="MagicPanelSelected"><div class="Ice"><div class="MagicName">Blizzara</div><div class="MPCost">36</div></div></div>
        <div id="MagicPanel1" class="MagicPanel"><div class="Fire"><div class="MagicName">Fire</div><div class="MPCost">15</div></div></div>
        .... (rest of panel divs)
    </div>

the first div has MagicPanelSelected as its class as it’s the currently selected div. I can guarantee that whatever the active/important div that I need to be displaying will always have this class.

In terms of usage scenario, I’m using this to design menus for a C++ game (so several pre-defined variables are being pushed into the page which is then rendered them via awesomium). This is why I’m looking to do this without the use of the mouse. Awesomium is based off a fairly recent build of Chrome, so the solution does NOT need to be cross-browser compatible, as long as it works on Chrome.

I can guarantee fixed length for the size of the parent div and child divs (once I decide on the appropriate length), however the number of MagicPanel divs may be loaded into the parent MagicPanels div at any one time range from 0 to 120+. I have variables available to tell me how many divs total and how many divs per row there are.

When the user scrolls past the set of divs, I’d like to be able to loop back to the start (either by quickly scrolling back to the top, or by loop the top divs again at the bottom)

If it’s important, this is the css for those elements

.MagicPanels
{
    width: 580px;
    height: 160px;
    left: 4px;
    position: relative;
    display: inline-block;
    -webkit-border-radius: 10px;
    border-radius: 10px;

    -webkit-box-shadow: 5px 5px 5px #888;
    box-shadow: 5px 5px 5px #888;
    border-width: 16px 16px 16px 16px; 
    -moz-border-image: url(MagicBorder.png) 33 32 33 34 round; 
    -webkit-border-image: url(MagicBorder.png) 33 32 33 34 round; 
    -o-border-image: url(MagicBorder.png) 33 32 33 34 round; 
    border-image: url(MagicBorder.png) 33 32 33 34 round;
    z-index: 1;
    overflow: hidden;
}

.MagicPanel
{
    width: 150px;
    height: 30px;
    margin: 0 10px 7px;
    opacity: 0.5;
    display: inline-block;
    position: relative;
}
.MagicPanelUnusable
{
    width: 150px;
    height: 30px;
    margin: 0 10px 7px;
    opacity: 0.3;
    display: inline-block;
    position: relative;
}

.MagicPanelSelected
{
    width: 150px;
    height: 30px;
    margin: 0 10px 7px;
    background-opacity: 1.0;
    display: inline-block;
    position: relative;
}

The other CSS classes (i.e. Fire, Ice etc.) just define the gradients/font for the text and have no effect on the layout of the divs.

If anyone knows how to do this, or can give me a good starting point I’d appreciate it.

Thanks

  • 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-05-24T08:38:32+00:00Added an answer on May 24, 2026 at 8:38 am

    You can set the scrollTop of any dom element like this. I hope this might help you to apply logic in your code.

    var valueToScroll = 100;
    $("selector").scrollTop(valueToScroll);
    
    //With animation
    
    $("selector").animate({ scrollTop: valueToScroll }, { duration: 200 } );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have div that contains 2 divs in it. One of the child divs
I have a parent div (container) that has a child div (inner) which also
I have a parent div, and it houses a bunch of child divs. One
Say I have a parent div with three child divs. Is there a way
I have noticed that both IE6 and IE7 push the parent div down when
I have a parent div, that holds three div's. They are basically columns. I
What a mouthful. Basically I have a parent <div> and inside that an <iframe>
So here is my CSS problem with IE 8. I have a parent div
I have a parent div with a fixed position and inside of that div
Is there a way to have a child DIV within a parent container DIV

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.