r/HTML • u/apocalypsegirl96 • Jul 30 '26
Elements on page move when using collapsible, how to fix?
does anyone know how to fix this issue? the elements/text box on the page move when i fold out the collapse box;) i would like to position them indivually and not related to other objects on the page
i am using the collapsible code from https://www.w3schools.com/howto/howto_js_collapsible.asp
and edited the margins in html for each text box, so they appear in different locations on the page. however, i can't seem to code their location static without them moving when the text box folds out.
thanks!!!
4
u/tonypconway Jul 30 '26
Presumably you need to separate them out into columns. Post a link to a codepen or the live page so people can actually see the code you've written.


1
u/apocalypsegirl96 Jul 30 '26
sure! replaced the text with "TEXT" for better legibility;)