1

I have a mobile menu for which I would like to increase the size of the menu by dragging it. Currently what I am doing is fixing it to a size of 50% of the screen. Below is how the menu looks.

enter image description here

The CSS, which I used to drag, doesn't work in this case.

.cbp-spmenu-bottom.cbp-spmenu-open {
    bottom: 8%;
    width: 100%;
  /*   height: 55%; */
    background: black;
    opacity: 1;
      overflow-y: auto;
    position: fixed;
    resize: vertical;
}

What could I do, so that I could touch the top bar, and resize the menu?

jacefarm
  • 6,747
  • 6
  • 36
  • 46
SNT
  • 1,283
  • 3
  • 32
  • 78

3 Answers3

2

Just make sure you dont set the position of the css to be fixed otherwise,you wont be able to drag.

position:fixed

Or you can set the position of the but what you can do is set it fixed after you resize and drag it as shown in this thread

Fiddle

Community
  • 1
  • 1
Pritish Vaidya
  • 21,561
  • 3
  • 58
  • 76
0

Here is a website which might help you. If this is unable to help you, you could check this website which has information on everything you can ever know about coding.

EDIT: You could try this sample code- <button onclick="myFunction(width:200%;height:200%)">Increase Size Of Menu</button>

I hope I helped you enough so you can be able to do what you want to do!

NeathanF
  • 1
  • 1
0

The problem with the resize property is that it is not supported by most mobile browsers. You can find more details here and here.

If you want mobile support a javascript solution would be your only choice. You can try a library like interact.js which seems to work fine on mobile devices.

Manos Pasgiannis
  • 1,693
  • 1
  • 18
  • 30