Forum Moderators: open
I have a CSS that fixes the problem for Internet Explorer.
Thanks for you help.
I posted this on another forum but never got an answer telling me whether or not it worked. They just want to know if there was a change. You'd have to add to it where the alerts are by re-adjusting the font size.
I don't really think it's a good idea. I think it would be easier to design for the possibility. I really think you should give this some thought. It looks to me to be a good way to code yourself into a corner.
This can be fined tuned to different font sizes
<html>
<head>
<title></title>
<style>
#a {
font-size: 14px;
}
</style>
</head>
<body>
<span id="a">text</span>
<script>
font_size = 14
el_h = document.getElementById('a').offsetHeight - 2
if (el_h < font_size) {
alert('smaller')
}
if (el_h == font_size) {
alert('unchanged')
}
if (el_h > font_size) {
alert('bigger')
}
</script>
</body>
</html>
<edit> just looking at this, to work properly the font-family needs to be specified. Which is another possible stumbling block should the user be using their own CSS. </edit>
Just kidding, I think IE will eventually have something similar. Maybe even fairly soon in version 7.
To be honest, most of the web will look odd to someone surfing with something other than 100%. I think they'd be expecting it. Kind of like someone still using NN4x.
I wouldn't do anything.