I am brand new to programming and javascript, and recently I tried practicing javascript with a website I created and whenever I declare any change in the DOM the website loses its css.


When I declare:

let "bodyTitle = document.getElementById('body1');

bodyTitle.textContent = 'Random TextContent';

I get the text changed but the CSS doesn't follow.

Did I just make faulty website structure or terrible css? I am still extremely new so I kind of threw things together to get my website.

Any help would be great!

  • Hey Ahmed, two things: Your missing code examples which make it hard to see what your doing wrong and this question would likely be better posted to SO (stackoverflow.com) as it doesn't seem related to SharePoint – Roland Nov 28 '18 at 2:25
  • thannks roland, i'll go check it out! – Ahmed G. Nov 28 '18 at 4:48