gurpreet94 Posted September 22, 2011 Share Posted September 22, 2011 Hi guys, I can't explain it with words properly but when someone tries to drag and drop an image, I want to turn it in the bar that appears when you hover over an input form. An example can be seen here: http://www.prisonstruggle.com/ Could anyone help me out here? I got no idea how to start because I don't know which terms to search for in google. Quote Link to comment https://forums.phpfreaks.com/topic/247677-turning-a-cursor-into-into-a-bar-the-one-where-you-type-when-you-try-to-drag/ Share on other sites More sharing options...
sunfighter Posted September 23, 2011 Share Posted September 23, 2011 This is used for drag and drop. I'd stay with the commonly excepted stuff: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>New document</title> <style type="text/css"> #main { border: red solid 1px; width: 100px; height: 100px; cursor: move; } </style> </head> <body> <div id="main" > </div> </body> </html> But if you instead use text instead of move. Quote Link to comment https://forums.phpfreaks.com/topic/247677-turning-a-cursor-into-into-a-bar-the-one-where-you-type-when-you-try-to-drag/#findComment-1272098 Share on other sites More sharing options...
gurpreet94 Posted September 24, 2011 Author Share Posted September 24, 2011 With that code, do you mean I should put my images and everything within the <div id="main">? Quote Link to comment https://forums.phpfreaks.com/topic/247677-turning-a-cursor-into-into-a-bar-the-one-where-you-type-when-you-try-to-drag/#findComment-1272379 Share on other sites More sharing options...
sunfighter Posted September 25, 2011 Share Posted September 25, 2011 It's an example. A show and tell. "cursor: move;" or "cursor: text;" is what you asked for and whats important. And yes use it in the picture div, cause that's the area where you want to change it. Quote Link to comment https://forums.phpfreaks.com/topic/247677-turning-a-cursor-into-into-a-bar-the-one-where-you-type-when-you-try-to-drag/#findComment-1272628 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.