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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:42:18+00:00 2026-06-18T16:42:18+00:00

I have a problem with a menu in css/jQuery, works fine in Firefox, but

  • 0

I have a problem with a menu in css/jQuery,
works fine in Firefox, but in IE, Opera, Chrome… when i hover mouse on element it goes to the left edge of page…

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
    <script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/js/bootstrap.min.js"></script>
    <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap.min.css" rel="stylesheet" />

    <style type="text/css"> .outer {width: 46px; height: 40px; position: fixed; z-index: 999999; display: block; top: 25%; right: 0px; background: #036; }.inner {overflow: hidden;width: 100px;} .modal {display: none;} .modal-inner {width: 600px;margin: 100px auto;height: 300px;background: #fff !important;border: 12px solid rgba(222, 222, 222, 0.8);z-index: 999999;border-radius: 5px;}.backdrop {z-index: 999998;}</style>

</head>
<body>

    <div class="outer">
        <div class="inner" style="">Subscription</div>
    </div>

    <script type="text/javascript">
        $('.outer').on('mouseenter', function () {
            $(this).animate({ left: "-=100", width: "+=100" });
        });
        $('.outer').on('mouseleave', function () {
            $(this).delay(200).animate({ left: "+=100", width: "-=100" });
        });
        $('.outer').click(function () {
            $('.outer').animate({ left: "+=146" });
            $('.modal').modal();
        });
    </script>

    <div class="modal">
        <div class="modal-inner">
            Lorem ipsum
        </div>
    </div>

</body>
</html>

Where did I made a mistake?

  • 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-18T16:42:20+00:00Added an answer on June 18, 2026 at 4:42 pm

    This is happening because I think firefox is pretty good at guessing value of left offset of .outer (when its not explicitly specified) and so $(this).animate({ left: "-=100", width: "+=100" }); works perfectly. In case of other browsers left is not defined and its not auto calculated so animate causes it to set to 0 immediately and then it animates on left which is clipped and not shown.
    In this solution we set left to 100% explicitly and add a negative margin equal to the width of div.outer to position it correctly.
    like this

    .outer {
    width: 46px; height: 40px; position: fixed; z-index: 999999; display: block; top: 25%; right: 0px; background: #036;
    //add this
    left:100%;
    margin-left: -46px;
    }
    

    working fiddle

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

Sidebar

Related Questions

Problem: Site works in Firefox, Chrome, Safari but not in IE (7 & 8).
I have a three level menu that works on :hover and uses only css.
I have a problem with the positioning of a pure css dropdown menu. You
I have a horizontal CSS menu. The problem is when the user creates more
I'm with a positioning problem in IE7 have the following in my css menu
I have a problem with the jQuery Lavalamp plugin . It works perfectly with
I have a little problem with a .hover() in IE8 which works in FF,
I have a simple menu/submenu with jquery click() function and toggle(). My problem is,
I have a dropdown menu the expands on clicks rather than hover. The problem
I have a css menu the has a JQUERY opacity fade effect on the

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.