PDA

View Full Version : IE8 and ticker going onto 3 lines?!



jarv
Aug 25th, 2009, 11:58 AM
Can someone please help me with my ticker on my website in IE8, it shows the text flowing onto 3 lines?!: http://www.animalwelfareplatform.eu

Kristofa
Aug 25th, 2009, 01:22 PM
Validate (http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.animalwelfareplatform.eu%2F) your code.

The big issue I can see is that you're using a xhtml 1.0 doctype, yet the <div> tag and style attribute are in capitals for you ticker, which isn't allowed in xhtml.

xercool1080
Apr 20th, 2010, 10:20 PM
I am having the same issue on this site I am working with www.shoptalkk.com, The ticker is not working on IE 8

posted is the code below.

<div style="border-bottom: #cccccc 1px solid; background-color: #f7f7f7; width: 710px; display: none; overflow: hidden; border-top: #cccccc 1px solid; padding-bottom:2px" id=TICKER onMouseOver="TICKER_PAUSED=true" onMouseOut="TICKER_PAUSED=false">
<span style="background-color: #00bff3; font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#FFF; font-weight:bold">&nbsp;&nbsp;News&nbsp;Wire&nbsp;&nbsp;</span>&nbsp;<a style="font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#900; font-weight:bold; text-decoration:none"href="http://www.eurekalert.org/pub_releases/2010-04/ctco-ctm041910.php">Cell Transplants May Benefit Children With Cerebral Palsy,&nbsp;</a>&nbsp;
<a style="font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#900; font-weight:bold; text-decoration:none"href="http://www.google.com/hostednews/afp/article/ALeqM5jASESFmvJD5YM0f_4N4MK1mlhZKQ">IPad Drawing Interest as Device for Disabled,&nbsp;</a>&nbsp;
<a style="font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#900; font-weight:bold; text-decoration:none"href="http://www.elpasotimes.com/health/ci_14910733">Understanding Autism: Fast-Growing Disability Remains a Challenge For Parents, Researchers,&nbsp;</a>&nbsp;
<a style="font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#900; font-weight:bold; text-decoration:none"href="http://abcnews.go.com/Health/Autism/stomach-pains-autism/story?id=10388309">GI Problems and Autism Link? Experts Say No,&nbsp;</a>&nbsp;
<a style="font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#900; font-weight:bold; text-decoration:none"href="http://health.usnews.com/health-news/family-health/brain-and-behavior/articles/2010/04/19/genetics-psychology-may-trigger-adhd.html">Genetics, Psychology May Trigger ADHD,&nbsp;</a>&nbsp;
<a style="font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#900; font-weight:bold; text-decoration:none"href="http://www.inthenews.co.uk/news/adhd-children-respond-to-rewards-and-drugs-in-similar-way-$1372339.htm">ADHD Children Respond to Rewards and Drugs in Similar Way ,&nbsp;</a>&nbsp;
</div>
<script language=javascript type=text/javascript
src="/images/webticker_lib.js"></script>


--------------------------------------------------------------------------------

Here is the Javascript

TICKER_CONTENT = document.getElementById("TICKER").innerHTML;

TICKER_RIGHTTOLEFT = false;
TICKER_SPEED = 1;
TICKER_STYLE = "background-color:#f7f7f7";
TICKER_PAUSED = false;

ticker_start();

function ticker_start() {
var tickerSupported = false;
TICKER_WIDTH = document.getElementById("TICKER").style.width;
var img = "<img src=ticker_space.gif width="+TICKER_WIDTH+" height=0>";

// Firefox
if (navigator.userAgent.indexOf("Firefox")!=-1 || navigator.userAgent.indexOf("Safari")!=-1) {
document.getElementById("TICKER").innerHTML = "<TABLE cellspacing='0' cellpadding='0' width='100%'><TR><TD nowrap='nowrap'>"+img+"<SPAN style='"+TICKER_STYLE+"' ID='TICKER_BODY' width='100%'>&nbsp;</SPAN>"+img+"</TD></TR></TABLE>";
tickerSupported = true;
}
// IE
if (navigator.userAgent.indexOf("MSIE")!=-1 && navigator.userAgent.indexOf("Opera")==-1) {
document.getElementById("TICKER").innerHTML = "<DIV nowrap='nowrap' style='width:100%;'>"+img+"<SPAN style='"+TICKER_STYLE+"' ID='TICKER_BODY' width='100%'></SPAN>"+img+"</DIV>";
tickerSupported = true;
}
if(!tickerSupported) document.getElementById("TICKER").outerHTML = ""; else {
document.getElementById("TICKER").scrollLeft = TICKER_RIGHTTOLEFT ? document.getElementById("TICKER").scrollWidth - document.getElementById("TICKER").offsetWidth : 0;
document.getElementById("TICKER_BODY").innerHTML = TICKER_CONTENT;
document.getElementById("TICKER").style.display="block";
TICKER_tick();
}
}

function TICKER_tick() {
if(!TICKER_PAUSED) document.getElementById("TICKER").scrollLeft += TICKER_SPEED * (TICKER_RIGHTTOLEFT ? -1 : 1);
if(TICKER_RIGHTTOLEFT && document.getElementById("TICKER").scrollLeft <= 0) document.getElementById("TICKER").scrollLeft = document.getElementById("TICKER").scrollWidth - document.getElementById("TICKER").offsetWidth;
if(!TICKER_RIGHTTOLEFT && document.getElementById("TICKER").scrollLeft >= document.getElementById("TICKER").scrollWidth - document.getElementById("TICKER").offsetWidth) document.getElementById("TICKER").scrollLeft = 0;
window.setTimeout("TICKER_tick()", 30);
}