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

  • Home
  • SEARCH
  • 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 775003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:13:14+00:00 2026-05-14T19:13:14+00:00

I’ve just been learning some jQUery to get a basic image gallery going on

  • 0

I’ve just been learning some jQUery to get a basic image gallery going on a website I’m creating for a hotel but it’s currently not going to plan. I’ve got it so the arrows will cycle through images (no animation yet) but I decided that the arrows should fade in when the image is hovered over and fade out when not but this is messing up the CSS somehow.

The arrows start faded out by calling: $('.arrowRight').fadeOut(0);$('.arrowLeft').fadeOut(0);

at the start of the jQuery ready() function.

This is fine, but when you hover over the image and the arrows fade in, the image shifts to the right and I don’t know why. I suppose it could be because the left arrow now fading in means it is getting pushed over by it but the arrow has the following css:

position:relative;
top: -90px;
left: 25px;

Should a relative element be able to alter a normal element’s position?

If you need to try it out, just hover over the large (placeholder) image and they image will jump across when the arrows fade in and jump back when they fade out.

Any ideas why this is happening? I’m a jQuery noob.

Here is a link to the page: BeanSheaf Hotel Temporary Space

Thanks for your time,

InfinitiFizz

  • 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-14T19:13:15+00:00Added an answer on May 14, 2026 at 7:13 pm

    #imageContainer should have: position:relative

    arrowLeft should have:

    position:absolute;
    top:90px;
    left:5px;
    

    Relatively-positioned elements take up space in your layout. Since your arrows were relatively positioned they bump things around when they appear.

    In order to position things so this doesn’t happen, the items “on top” of the image need to be positioned absolutely. This means they are no longer part of the flow of the layout but are “on top” of it.

    Absolutely-positioned items need a point of reference for the point of origin (0,0). These items look at their wrapper and go up the HTML tree until they find the first relatively-positioned element to determine their origin point. If there is none, it uses the <body> as the point of reference.

    Because we are adding position:relative to imageContainer, the container now becomes the point of reference, allowing you to accurately position your arrows using top: and left:.

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

Sidebar

Ask A Question

Stats

  • Questions 542k
  • Answers 542k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Use: SELECT p.id as a, p.url as b, t.id as… May 17, 2026 at 3:22 am
  • Editorial Team
    Editorial Team added an answer There are two parts to the problem First Issue You… May 17, 2026 at 3:19 am
  • Editorial Team
    Editorial Team added an answer I thought I'd show the regex approach, too. It doesn't… May 17, 2026 at 3:18 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Seemingly simple, but I cannot find anything relevant on the web. What is the
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I am currently running into a problem where an element is coming back from
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on

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.