0
Why is there 'style' property not working in js?
3 odpowiedzi
+ 2
This is because the javascript is loaded before the html. One way to avoid this is to use the onload event:
onload = () => { Your javascript }
+ 2
Share a link to the non working code in the Description, and please add CSS in the tags ☝
https://www.sololearn.com/post/75089/?ref=app
+ 2
Huzaifa,
Please read the following post, it explains why this problem occurs, and provides also the workaround.
https://www.sololearn.com/post/90825/?ref=app