• Skip to main content
  • Skip to search
  • Skip to select language
MDN Logo
    • Technologies Overview
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs
    • Browser Extensions
    • MathML
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
    • Send Feedback
    • Contribute to MDN
    • Report a content issue 🌐
    • Report a platform issue 🌐
  1. Web technology for developers
  2. Web APIs
  3. MouseEvent
  4. MouseEvent.offsetX
  • Change language

Table of contents

  • Value
  • Specifications
  • Browser compatibility
  • See also

MouseEvent.offsetX

The offsetX read-only property of the MouseEvent interface provides the offset in the X coordinate of the mouse pointer between that event and the padding edge of the target node.

Value

A double floating point value.

Early versions of the spec defined this as an integer.

Specifications

Specification
CSSOM View Module
# dom-mouseevent-offsetx

Browser compatibility

See also

  • MouseEvent

Found a problem with this page?

  • Edit on GitHub
  • Source on GitHub
  • Report a problem with this content on GitHub
  • Want to fix the problem yourself? See our Contribution guide.

Last modified: Nov 5, 2021, by MDN contributors

Change your language

Related Topics

  1. MouseEvent
  2. Constructor
    1. MouseEvent()
  3. Properties
    1. altKey
    2. button
    3. buttons
    4. clientX
    5. clientY
    6. ctrlKey
    7. metaKey
    8. movementX
    9. movementY
    10. mozInputSource
    11. offsetX
    12. offsetY
    13. pageX
    14. pageY
    15. region
    16. relatedTarget
    17. screenX
    18. screenY
    19. shiftKey
    20. WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN
    21. WEBKIT_FORCE_AT_MOUSE_DOWN
    22. webkitForce
    23. x
    24. y
  4. Methods
    1. getModifierState()
    2. initMouseEvent()
  5. Inheritance:
    1. UIEvent
    2. Event
  6. Related pages for DOM Events
    1. CompositionEvent
    2. Event
    3. EventListener
    4. EventTarget
    5. FocusEvent
    6. InputEvent
    7. KeyboardEvent
    8. MouseScrollEvent
    9. MutationEvent
    10. ProgressEvent
    11. UIEvent
    12. WheelEvent
MDN Logo
  • Web Technologies
  • Learn Web Development
  • About MDN
  • Feedback
  • About
  • MDN Web Docs Store
  • Contact Us
  • Firefox

MDN

  • MDN on Twitter
  • MDN on Github

Mozilla

  • Mozilla on Twitter
  • Mozilla on Instagram

© 2005-2025 Mozilla and individual contributors. Content is available under these licenses.

  • Terms
  • Privacy
  • Cookies