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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:57:41+00:00 2026-05-20T17:57:41+00:00

I want to create an Element, which is very thin, and very high. I

  • 0

I want to create an Element, which is very thin, and very high. I want the element to be visible all time, even if you scroll to the right. It should be position:fixed to the right, and left, but it should be scrollable down and up.
I searched with google, but couldn’t find an appropiate way to solve the problem.
I only found this site:
http://demo.rickyh.co.uk/css-position-x-and-position-y/
This is exactly, what I want to have, BUT I am using jQuery, and not MooTools. I am looking for the same function in jQuery. I do not really want to use 2 Frameworks. Does anyone know help? Anything? I have been looking several hours, but I can’t find something that fit to my needs in jQuery.

  • 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-20T17:57:42+00:00Added an answer on May 20, 2026 at 5:57 pm

    Here’s a solution with jquery

    jsfiddle demo

    the html

    <div style="width:1000px;height:1000px;">
        <div id="box1" class="box" style="left:20px;top:20px;">
            My position-x is fixed but position-y is absolute.
        </div>
        <div id="box2" class="box" style="left:20px;top:120px;">
            My position-x is absolute but position-y is fixed.
        </div>
        <div id="box3" class="box" style="left:20px;top:220px;">
            Im positioned fixed on both axis.
        </div>
    </div>
    

    the code

    $(window).scroll(function(){
        var $this = $(this);
        $('#box1').css('top', 20 - $this.scrollTop());
        $('#box2').css('left', 20 - $this.scrollLeft());
    });
    

    and some css

    .box 
    {
        width:400px;
        height:80px;
        background:gray;
        position:fixed;  
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a textfield element in Zend Form which always type in
Consider I have an array of elements out of which I want to create
I want to create the following element: <exercises xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="mySchema.xsd"> If I use something
I want to create a new element with html5 data attributes defined, however they
I want to create a dialog that contains some kind of text element (JLabel/JTextArea
i want to split a string with regex, then create a dom element where
I have a script that create a new div element. Then, I want to
I want to create a page which has footer and some common parts. On
I would like very much to create a web page which would have the
I'm trying to do something which should be very simple...I have a site with

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.