You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more
I've failed to solve this after hours of hunting around. I have a span containing text elements. In firefox I can index the childNodes array and use offsetLeft and offsetWidth to insert breaks if the span gets wider than the screen, but in IE these values are -1 and 0, and using the script debugger there don't seem to be any properties to tell me where they are...
IE sucks bigtime. I hate testing anything in it.
IE sucks bigtime. I hate testing anything in it.
sho nuff, but lots of people still use it 🙁 What puzzled me is IE8 is supposed to much more standards compliant, yet things [b]still[/b] don't work...
You able to share the css?
You able to share the css?
[url= http://www.bogtrotters.org/show_album_shot2.php?jumpid=39377 ]this what I'm doing[/url], I have a string of tags which I want to fit within the screen width (ignoring the case when the window isn't full screen), so I can keep them visible as the window scrolls when you click a tag. For now I've forced the span to have width=screen.width if it's IE, but this acts a bit stupid if the span is initially narrower 🙁 Unfortunately I can't discover the span width
have you tried changing it from a span to a div? Might sound daft but span's are the bane of my life when trying to add cross-browser friendliness at work...
oh, and from memory you could do something like use clientWidth (?) when referencing the element in javascript so not sure document.getElementById(spanid).clientWidth would work or not? Again, from the deepest depths of my memory so maybe I'm imagining things...
have you tried changing it from a span to a div?
I did wonder if using a div with style 'display:inline' might work, I'll try it 🙂
edit: no difference 🙁 As far as I can see, the only difference between a span and a div is that a div has block display by default
I found the solution - IE doesn't set the offsetWidth etc properties till the screen is redrawn, so you have to set an onload event handler or onresize subsequently followed by a setInterval asynchronous callback!
IE - spawning inelegant solutions for a decade.
:O)
IE - spawning inelegant solutions for a decade.
yeah, tell me about it 🙁