+ 1
Javascript font size(increase/decrease)
https://code.sololearn.com/WEa6KWy357ZY/?ref=app In the coding attached, the font sizing increase/ decrease function buttons seems to work but only on the ‘font size’ paragraph. I was intending to change the font size of the whole page. What am I doing wrong here? Thanks
2 odpowiedzi
+ 2
line 76 and line 89
change to apply on
document.body
+ 2
Szan Gulé hi,it seems you apply your style.fontSize only to the element with id=changesize which is that specific div.
either you could try to give a class=changesize to all the elements you'd like to resize either you could apply that to your body element
document.querySelector("body").
And manipulating values sometime things could not occurs as expected because of specifity in CSS so you could check that for awareness :
https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity