should help to prevent font-size from getting bigger when you change orientation form portrait to landscape…
but for some reason this is helping ONLY for the font in the top-nav section(including links and selected, non-link nav elements), but not for main section of the page… on the main section of the page when you switch to landscape the font gets bigger, but not the font in the top nav… I want the font-size throughout not to change (can change when user chooses to zoom up, but I don’t want any font-sizes to change when orientation changes form portrait to landscape…)
how can I prevent font in main section from changing size when I change orientation?
(have not been able to test on Android (or Windows) phone, so I don’t know if this is an issue on phones other than iPhone…)
thank you…
PS: just realized that with tag I have user can’t zoom up, so: is there a tag that will prevent font-sizes to change on orientation chg, but that user can still zoom up if they choose to? (oh brother… mobile development; it’s not just a job, it’s an adventure… ;-))
Probably need a more concrete example to be sure of what you mean. But you can have a class on an element which is set to display: none in the desktop styles and display: block in the phone styles, for example.
well, needed to trigger event based on user input, but ONLY in phones (not tablets…) so either way, whether changing classes, show/hide, etc… needed to find a way to detect screen dimensions…
so just did
if (screen_width < 480) {
(question: 480 is the width of iPhone screen (when in landscape), right? but don’t some Android phones have larger screens? what is screen width of LARGEST smartphone??)
Certainly iPhone does. I can’t say for sure with others, but I think so. The iPhone display has gradually packed in more pixels (with the retina display etc.) and it would be an awful pain if you had to target each iPhone version differently, so thankfully they’ve spared us that misery.
once again thank you very much, Ralph… you have been very very helpful…
Glad to be of help. I admit I’m a bit of a blind leader, but better than nothing, hopefully.
(if 480 or less than, instead of just less than…) that should be a bit safer, no?