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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:21:28+00:00 2026-05-26T10:21:28+00:00

I got help earlier for the placement if my jquery box but it wasn’t

  • 0

I got help earlier for the placement if my jquery box but it wasn’t universal and I don’t quite understand it. The code moves my drop down box to expand toward the right, however now that I’ve changed the links position, the box no longer lines up correctly. Here’s the new code:

$('.menu ul li:has("ul")').each(function(){
   var nameWidth = $(this).outerWidth(),
       dropdownWidth = $(this).find('ul').width(),
       change = (dropdownWidth - nameWidth) - 10;
    $(this).find('ul').css('left', change+'px');

Here’s my entire code http://jsfiddle.net/rKaPN/30/

  • 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-26T10:21:29+00:00Added an answer on May 26, 2026 at 10:21 am

    In your css you can change the following:

    .menu ul li ul{
       position:absolute;
       right: 0px;  // Add this  
       // Rest of your css
    }
    

    It will align the the dropdown to the right, just like you had it earlier to the left, without using the each loop you described. However, your loop also becomes functional when you merely define the left property:

    .menu ul li ul{
        position:absolute;
        left: 0px;  // Add this  
        // Rest of your css
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got some help with this earlier today but I cannot figure out the
Hi I posted this earlier and got some help but still no working solution.
I just got help with the jQuery portion of this code (thanks David Thomas)
I got help with correct calculation the other day but I've hit a block
I got some code off the Internet and now I just need help to
I need help... I got errors with my android xml... Here's the code: <?xml
I asked a question yesterday on here and got some awsome help, but I
I'm going to repeat a question I asked earlier but I need help using
I just got help in how to compile this script a few mintues ago
So I have a tiny problem. I got help here a while ago about

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.