I\'m trying to make a font in a div responsive to the browser window. So far, it has worked perfectly, but the parent div has a max-width
of 525px
. Res
Please note that setting font-sizing with px is not recommended due to accessibility concerns:
"defining font sizes in px is not accessible, because the user cannot change the font size in some browsers. For example, users with limited vision may wish to set the font size much larger than the size chosen by a web designer." (see https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
A more accessible approach is to set font-size: 100%
in the html, which respects user default size settings, and THEN using either percentages or relative units when resizing (em
or rem
), for example with a @media query.
(see https://betterwebtype.com/articles/2019/06/16/5-keys-to-accessible-web-typography/)