Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all
I want to resize the div.resize is working but when I move the mouse pointer to the right edge of the div mouse cursor has to change from pointer to e-resize.I tried the below code
HTML
<div class="TimeBarDrag">
Timebar
</div>

CSS
.TimeBarDrag {
    background: none repeat scroll 0 0 #C1D8FF;
    border: 1px solid #2A7FFF;
    cursor: e-resize;
}

Now cursor has changed from pointer to e-resize on all the edges of the div but I want only on right edge of the div.Can any please help me to get out of this problem.
Posted

1 solution

Hello!

I think you should use jQuery, for example http://jqueryui.com/demos/resizable/[^]:

XML
<style>
    #resizable { width: 150px; height: 150px; padding: 0.5em; }
    #resizable h3 { text-align: center; margin: 0; }
    </style>
    <script>
    $(function() {
        $( "#resizable" ).resizable();
    });
    </script>

<div class="demo">

<div id="resizable" class="ui-widget-content">
    <h3 class="ui-widget-header">Resizable</h3>
</div>

</div><!-- End demo -->



<div style="display: none;" class="demo-description">
<p>Enable any DOM element to be resizable.  With the cursor grab the right or bottom border and drag to the desired width or height.</p>
</div><!-- End demo-description -->


And you could see http://rickyelrod.tumblr.com/post/12726746062/jquerys-resizable-of-position-fixed-divs-also[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900