Jump to content

help with stupid html text


optikalefx

Recommended Posts

i made this dragging script that lets u drag elements on a page around for fun.

 

i have a few versions, one is all relative position.  one is absolute.  but absolute doesnt work.

in this example i made, it sets a style to all dragable elements.  it sets its position to relative.  Then the drag script uses the mouse coords and the object width and position to drag.  the problem is, if you leave elements dragged with relative position, they wrap with the page and become stupid and obnoxious. and not where u placed them.  so i tried to set the object u clicked on to absolute.  that works except the text under the object moves into its position.  not good.  so i said ok once u place the object then it sets absolute position.  it seems as soon as you set an element to absolute position the elements around it populate the old area.  if you go to www.4tenonline.com/lookatme.htm you can see what i mean.  click the background, then again, and then u can drag say the top green text.  but as youll see the text beneath that moves too. when i set the script to not set any absolute position, it works fine.  except for relative postition sucks when your placing elements.  i tried to set all dragable elements to their absolute position. but i couldnt get it to set.  i have 2 functions getX() and getY() that get an elements absolute position.  so i can set it.  Im able to set every single left and top for each element, but as soon as i set absolute to them, the x and y gets screwed up. idk

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.