views:

25

answers:

5

hi guys...

I want to produce a sort of select/resiz border when some on click on the div, and when i move mouse over that the cursor should change accordingly. I want the user to be able to drag the element border and the element re-size accordingly

thanks....

+2  A: 

You cannot do that with pure CSS. You would have to use JavaScript. I suggest checking out a JavaScript library like jQuery.

Have a look to this jQuery plugin:

Daniel Vassallo
+2  A: 

This is not something which CSS can do by itself. Javascript is needed to do this sort of behaviour.

If you want to implement this, take a look at the Resizeable function of the jQuery UI library. http://docs.jquery.com/UI/Resizable

nickf
You beat me by 7 seconds with the same answer with the same link :) +1
Pekka
+1  A: 

This is not a job for CSS. CSS is (mostly) for styling only, not functionality.

Check for example the JQuery resizable plugin. It should be what you need.

Pekka
+1  A: 

As others have mentioned, this isn't something that can be accomplished by CSS, which is presentation only. Have a look at Yahoo's excellent YUI library and their Resize Utility, here is an example:

http://developer.yahoo.com/yui/examples/resize/simple%5Fresize.html

Kristopher Ives
A: 

There is a very nice demo of using jQuery to do what you are looking for. It uses the jQuery Resizing with images CSS and a few other things. Take a look at Layout

Philip Schlump