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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:54:13+00:00 2026-06-07T09:54:13+00:00

There is a map placed as a background image on an html page. There

  • 0

There is a map placed as a background image on an html page. There is also a transparent image representing the sound waves originating from a certain point on the map, i.e the center of the waves. When the wave image is put on top of the map in its full size, the center of the wave image is on the correct position (pointing the desired center point on the map) with the #waveImage {position:absolute;bottom:0;right:0} css rule.

Problem is that I need to dynamically scale the wave image, never larger than its original size, based on an arbitrary algorithm. Obviously, when the image is smaller, the center point is offset from the original center, towards the right and bottom due to the initial css positioning, so I have to move the wave image so that the center of the wave still points to the same location on the map. What I need is the algorithm to calculate the correct offsets from right and bottom.

Some information that may be of further help: Wave image is 673px x 655px large, center of the wave is not on the center of the image.

  • 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-07T09:54:15+00:00Added an answer on June 7, 2026 at 9:54 am

    http://jsfiddle.net/k7uGu/6/

    HTML:

    <div class="map">
        <div class="signal-wrap">
            <img class="signal" src="signal.png">
        </div>
    </div>​
    

    CSS

    .map {
        background: url(map.png) no-repeat;
        position: relative;
        width:  770px;
        height: 688px;
    }
    
    .signal-wrap {
        position: absolute;
    
        /* find/set the center position on the map,
           using the right bottom corner for positioning
           to avoid "surprise" scrollbars appearing
        */
        right:  28%;
        bottom: 33%;
    
        /* change these to resize signal.
           you can always use a square shape (width=height),
           even if the image inside is not square
        */
        width:  10%;
        height: 10%;
    }
    
    .signal {
        display: block;
        position: absolute;
    
        /* image width will be equal to parent square's size
           height must not be set to keep original image shape
        */
        width: 100%;
    
        /* position of the center of the signal
           relative to the parent square
        */
        right:  -23%;
        bottom: -20%;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with Javascript/jQuery and CSS to have a "background" image of a map
I have the script below placed in the HEAD of the page. The map
With google maps api (utlizing there new Places Library)Im trying to: Display a map
Is there a Java Map keySet() equivalent for C++'s std::map ? The Java keySet()
is there any way to map 2 Models once in my application ( Mapper.CreateMap())
Is There a way to do an hash map in javascript that holds 1
Is there any way to get a map or other data structure of the
Is there any way to retrieve the address map file for ntdll.dll? I know
Is there an easy way to map a directory in the web.xml or other
Is there a simple way/module to map snmp(MIB) strings to OIDs in Perl? E.g.

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.