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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:24:51+00:00 2026-05-27T12:24:51+00:00

Still new to Javascript and JQuery. I have a div with a div .

  • 0

Still new to Javascript and JQuery. I have a div with a div. I set a background image in the outer div and I want to set another image in the inner div. I also want to set the inner div at top left 10 10 from the outer div.

I am using the following code (lc is outter, slc1 is inner):

$(myPage.hash('lc')).css("background-image", "url(images/leftcolumn640.jpg)");

$(myPage.hash('slc1')).width("200");
$(myPage.hash('slc1')).height("200");
$(myPage.hash('slc1')).position({
    my: "left top",
    at: "left top",
    offset: "10 10",
    of: myPage.hash('lc'),
    collision: "fit"
}); 

$(myPage.hash('slc1')).css("background-image", "url(images/Square_200w_200h.png)");

Both the inner and outer image are diplayed, but the inner image is not at 10 10 of the outer image. What am I doing wrong? How can I solve this? 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-27T12:24:51+00:00Added an answer on May 27, 2026 at 12:24 pm

    Try the following:

    $(myPage.hash('slc1')).css({
      width:200,
      height:200,
      position:"relative",
      top:10,
      left:10,
      backgroundImage:"url(images/Square_200w_200h.png)"
    });
    

    Alternatively, you could try using margins instead of positions.

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

Sidebar

Related Questions

I am still new to Javascript and JQuery. I have written a small function
I'm still relatively new to javascript and jQuery and was just wondering this. Suppose
still new to XML parsing with the iphone so i have a few questions.
I'm still new with C#, and I'm working on a project where we also
I am still new to LINQ, and I have wrestled with a query for
I'm fairly new to jQuery still and am trying to pick up ways to
thanks for taking the time to read this. I have a JavaScript (jQuery) navigation
i tried to create a simple css background-image transition usind the jquery fadeIn fadeOut
Sorry, I am still new using jquery so this might be an easy question.
I'm still new to JQuery, AJAX and PHP. I was wondering what I could

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.