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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:34:38+00:00 2026-06-15T01:34:38+00:00

I have a text element within an SVG that I have applied jQuery ui

  • 0

I have a text element within an SVG that I have applied jQuery ui draggable to. Whenever I try to drag it around, the top and left CSS attributes change as you would expect, however, the element itself does not move – it just stays where it is.

This defys everything I understand about positioning. It seems as though it is just ignoring the ‘top’ and ‘left’ rules altogether.

However, the plot thickens.

I have also applied ui-draggable to an image within the same svg and it’s working fine for that. When I drag it around, it moves as expected.

Most intriguingly, if I drag some text, then it won’t move however if I then move the image, then the text suddenly moves to where I had tried to drag it to!

Can someone provide any insight as to what is going on here please?

The HTML looks like this:

<svg id="k" width="220" height="440" preserveAspectRatio="none">
    <image xlink:href="http://u.r.l/media/1353519179-9178.png" width="220" height="440" preserveAspectRatio="none" x="0" y="0" style="position: relative; left: 2px; top: 3px;" class="ui-draggable" transform="rotate(0,112,223) translate(2,3)"></image>
    <text id="svgtxt" x="0" y="0" style="position: relative; left: 101px; top: 118px;" class="ui-draggable" transform="rotate(0,101,118) translate(101,118)">Hello, world!</text>
</svg>

The JavaScript looks like this:

// ...

$("#k image").draggable({
    refreshPositions : true
});

// Make the text element draggable
$("#k text").draggable({
    refreshPositions : true
});

// ...
  • 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-15T01:34:39+00:00Added an answer on June 15, 2026 at 1:34 am

    The svg text element doesn’t do anything with position, because it adheres to the svg rendering model, not the CSS box model. For a list of properties supported in svg content, see the svg specification.

    You can set position on the entire <svg> fragment if it’s inline in html, because in that case it’s laid out by CSS.

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

Sidebar

Related Questions

I have a function that changes a dom element's text to a given value,
I have an anchor element that looks like this <a href=url><img src=imgurl/>Text</a> I would
I have a text field within Flash that contains a block of (obviously) text.
I have a <select> element within which I would like to Capitalize the text
I have a h1 element that I have set to ContentEditable = true. Within
I have text input element and an event is fired on blur event and
I have a Raphael text element with both a mouseup and click event handler.
I have a text file like this: A B C And each element has
I have an html td element with text inside. I want it so you
I have an INPUT element of the TEXT type and I want to perform

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.