+ 11

Resizable div container attached to bottom in html.

I want to create a div that is sticky to the bottom and can appear when clicking the button that has height depending on the amount of text on the textarea. For example: Same like on sololearn non-html playground. When you type code on the editor and press "run", a window appears on the bottom that can be pulled up to resize and dismissed by pulling down. I wanted to make similar to that one. See my code and help me.. https://code.sololearn.com/WaTMzYI0f9iy/?ref=app

29th Sep 2020, 7:51 AM
Bibek Oli
Bibek Oli - avatar
7 Respuestas
+ 8
#shown{ display:none; position: fixed; bottom: 0; width:100%; background:teal; color:white; bottom:0; }
29th Sep 2020, 10:08 AM
JOY
JOY - avatar
+ 8
Bibek Oli to make work out the left , top, right, bottom You need to include 'Position' Such as position: absolute Position: relative Position:fixed
29th Sep 2020, 10:14 AM
Farhanaz 🌟
Farhanaz 🌟 - avatar
+ 2
Maybe u have used placeholder for "some text"
29th Sep 2020, 10:07 AM
RuntimeERROR
RuntimeERROR - avatar
+ 2
For sticky you can use Position:sticky; With bottom and left property to set position. For resizable content area use can use a div with contenteditable:true; and css property resize Resize property allow you to resize the element horizontally,vertically or both.
29th Sep 2020, 10:31 AM
Divya Mohan
Divya Mohan - avatar
+ 2
Divya Mohan Will I be able to resize it from phone or only PC?
29th Sep 2020, 10:32 AM
Bibek Oli
Bibek Oli - avatar
+ 2
You have to just drag the bottom right coner of element to resize it. I have android and it's working well here.you can check in my code. I don't know wheather it works perfectly or not on desktop.u can try it there
29th Sep 2020, 10:35 AM
Divya Mohan
Divya Mohan - avatar
29th Sep 2020, 10:38 AM
Divya Mohan
Divya Mohan - avatar