how do i stick elements to the side of the screen??? 🤔 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

how do i stick elements to the side of the screen??? 🤔

I have been liking SVG it's so good and nice, with SVG I no longer need to think about resolutions. So, I am now making what Is currently called "SVG Maker!" (current name). The current structure has three main pieces: the properties panel, objects panel, and the result SVG. I'm working on the properties panel right now it needs to stick to the right of the screen. How do I do that?

10th Jan 2020, 1:06 PM
doonv
doonv - avatar
2 Answers
+ 4
For that you can set: position: fixed; along with either: left: 0; or right: 0; depending on which side you want to have it. If you want it to stick to the side of some container instead of the whole screen you have option of: position: relative; for the container and: position: absolute; for the sticky element.
10th Jan 2020, 1:11 PM
Winged
Winged - avatar
0
That works and it makes sense, thanks!
10th Jan 2020, 1:15 PM
doonv
doonv - avatar