Good afternoon,
Im having trouble with my header.
I have a container which has a h1 tag inside it that shows a title. Normally a name. I have set the font size to a suitable size to make it fit nicely in a range of scenarios and lengths.
That size changes with media queries.
I’ve now come across longer titles which don’t fit well. I’ve made the font smaller but then for the majority it doesn’t look good as it’s too small.
Is there a way of adjusting the font size so it fits the container?
My current solution might be to do a PHP switch based on string length and then apply a different CSS style class to the H1 based on its length.
Before doing this however I wanted to ask if there was a way do achieving this in CSS first?