...

View Full Version : Translating some obsolete styling to CSS



Partizan
05-13-2009, 01:27 PM
Hi there.

Any Idea how I can make a CSS class to replicate the following attributes in this SPAN and any idea how I call the class on my HTML page?

<span id="mtxt" style="position:relative;top:1px;padding:5px 5px 5px 5px;font-family:arial;font-size:10pt;width:100%;overflow:auto;height:75px">
</span>

Thanks
David

adios
05-13-2009, 01:46 PM
That's a pretty basic question, so I may be misunderstanding it.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>untitled</title>
<style type="text/css">

span.special {
width: 100%;
height: 75px;
position: relative;
top: 1px;
padding: 5px 5px 5px 5px;
font: normal 10pt arial;
overflow: auto;

}
</style>
</head>
<body>
<span id="mtxt" class="special">special span</span>
</body>
</html>

'style' is actually the attribute; the rest is rules. Inline CSS isn't really 'obsolete' - it's just a mess, and difficult to maintain.

_Aerospace_Eng_
05-13-2009, 01:54 PM
The height on that span will never work unless display:block; is specified in which case just use a div instead.

Partizan
05-13-2009, 02:04 PM
Thanks adios,

One think I want to do is stop underlines of hyperlinks that are contained within the span tags. I added text-decoration: none; but it didn;t work.

Also I wanted to make text a certain colour, I added color: blue; but it didn't work too.

I am using a script and it outputs hyperlinks in between these SPAN tags.

Ideally I wanted to use my own CSS hyperlink settings:


.link-news { font-family: "calibri"; font-size: 100% ; color: #CC0000; display:inline;}
.link-news:link {text-decoration: none; display:inline;}
.link-news:visited {text-decoration: none; color: #CC0000; display:inline;}
.link-news:active {text-decoration: none; display:inline;}
.link-news:hover {text-decoration: underline; color: grey; display:inline;}

and call it like maybe


<span id="mtxt" class="link-news"></span>

but this doesn't work and I am not sure why :confused:

Rowsdower!
05-13-2009, 02:21 PM
Thanks adios,

One think I want to do is stop underlines of hyperlinks that are contained within the span tags. I added text-decoration: none; but it didn;t work.

Also I wanted to make text a certain colour, I added color: blue; but it didn't work too.

I am using a script and it outputs hyperlinks in between these SPAN tags.

Ideally I wanted to use my own CSS hyperlink settings:


.link-news { font-family: "calibri"; font-size: 100% ; color: #CC0000; display:inline;}
.link-news:link {text-decoration: none; display:inline;}
.link-news:visited {text-decoration: none; color: #CC0000; display:inline;}
.link-news:active {text-decoration: none; display:inline;}
.link-news:hover {text-decoration: underline; color: grey; display:inline;}

and call it like maybe


<span id="mtxt" class="link-news"></span>

but this doesn't work and I am not sure why :confused:

I think you need to add the text-decoration:none; to the .link-news class (and then really you could remove it from the :link, :visited, and :active ones.

Really there is a lot of unneeded CSS in there. Try this to optimize:
.link-news { font-family: "calibri"; font-size: 100% ; color: #CC0000; display:inline;text-decoration:none;}
.link-news:hover {text-decoration: underline; color: grey;}

This should have exactly the same effect. Let me know if this doesn't work for any reason. Also, depending on what style exists in "mtxt" you may have a conflict of styles causing the problem.

Last but not least, the javascript might be creating it's own style on these links. That would be the next place to check if the above doesn't work.

Do you have a link to the page in question?

Partizan
05-13-2009, 02:27 PM
Hi Rowsdower,

This is the page I am testing on:

http://www.minifigtimes.com/index6.shtml

However I am using Adios' inline CSS at the moment because calling
<span id="mtxt" class="link-news"></span>
does not seem to work

The mtxt, I do not know what this is.. this was just part of the script I found..

Should I replace it? I suspect this could be causing the problem.

EDIT: I will make a test page http://www.minifigtimes.com/index7.shtml with your approach and a test class called .link-test

Rowsdower!
05-13-2009, 02:30 PM
It looks like you can just remove that id attribute completely -- it has no styles attached to it.

Partizan
05-13-2009, 02:38 PM
It looks like you can just remove that id attribute completely -- it has no styles attached to it.

If i do delete it no scrolling text appears at all.

mtxt is referred to in the script
mtxt.innerHTML = "<a href='"+temp2+"'>"+curr+" _</a>";

here:





<SCRIPT LANGUAGE="JavaScript">

var newslist=new Array();
var cnt=0; // current news item
var curr = "";
var i=-1; // current letter being typed

newslist[0]=new Array("LFC preparing 'mega bid' for Marino star Wook-Jin You","http://www.minifigtimes.com")
newslist[1]=new Array("Celebs ready for crunch showdown with Legoland United claims manager Giovanni Trapattoni","http://www.minifigtimes.com")

function newsticker()
{
// next character of current item
if (i < newslist[cnt][0].length - 1)
{
i++;
temp1 = newslist[cnt][0];
temp1 = temp1.split('');
curr = curr+temp1[i];
temp2 = newslist[cnt][1];
mtxt.innerHTML = "<a href='"+temp2+"'>"+curr+" _</a>";
setTimeout('newsticker()',40)
return;
}
// new item
i = -1; curr = "";
if (cnt<newslist.length-1)
cnt++;
else
cnt=0;
setTimeout('newsticker()',6500)
}
</script>

adios
05-13-2009, 02:42 PM
Better keep that id if you want the script to work. ids are used for other things than CSS - in this case, the script needs that element object. Is this an IE-only thing? Only IE exposes ids as global variables ...

Rowsdower!
05-13-2009, 02:42 PM
If i do delete it no scrolling text appears at all.

mtxt is referred to in the script
mtxt.innerHTML = "<a href='"+temp2+"'>"+curr+" _</a>";

here:





<SCRIPT LANGUAGE="JavaScript">

var newslist=new Array();
var cnt=0; // current news item
var curr = "";
var i=-1; // current letter being typed

newslist[0]=new Array("LFC preparing 'mega bid' for Marino star Wook-Jin You","http://www.minifigtimes.com")
newslist[1]=new Array("Celebs ready for crunch showdown with Legoland United claims manager Giovanni Trapattoni","http://www.minifigtimes.com")

function newsticker()
{
// next character of current item
if (i < newslist[cnt][0].length - 1)
{
i++;
temp1 = newslist[cnt][0];
temp1 = temp1.split('');
curr = curr+temp1[i];
temp2 = newslist[cnt][1];
mtxt.innerHTML = "<a href='"+temp2+"'>"+curr+" _</a>";
setTimeout('newsticker()',40)
return;
}
// new item
i = -1; curr = "";
if (cnt<newslist.length-1)
cnt++;
else
cnt=0;
setTimeout('newsticker()',6500)
}
</script>

D'oh! You're absolutely right. I completely ignored that and was only thinking in CSS mode. In that case, why bother with the class? just make an ID css rule with all of the same stuff and kick out the class. Also, this might be part of the problem (you are missing the red parts):
.link-news a { font-family: "calibri"; font-size: 100% ; color: #CC0000; display:inline;text-decoration:none;}
.link-news a:hover {text-decoration: underline; color: grey;}

Your ID and class are attached to the span when what you really want to style is the <a> element within. See if this makes a difference. Or if you want to use just the ID as suggested use this:
#mtxt a { font-family: "calibri"; font-size: 100% ; color: #CC0000; display:inline;text-decoration:none;}
#mtxt a:hover {text-decoration: underline; color: grey;}

Partizan
05-13-2009, 02:54 PM
WOOOHOOO! that worked! I used the ID only approach and dropped the class, thanks a million, and thanks adios!

There is 2 things I would like to tweak ..

1. Upon loading the page the first few characters are not displayed. Can I insert a delay to call script upon pageload?


2. Is it possible to stop some of the strings being hyperlinked or is this a fundamental part of this script..

Eg:


newslist[0]=new Array("LFC preparing 'mega bid' for Marino star Wook-Jin You")
newslist[1]=new Array("Celebs ready for crunch showdown with Legoland United claims manager Giovanni Trapattoni","http://www.minifigtimes.com/story1.shtml")


Of the above I would like the first string not to be a hyperlink as it is just some snippet of info but the second string I want to remain hyperlinked as it goes to a story..

Possible?

I guess if I didn't want any hyperlinks at all I would remove the <a> tags from <a href='"+temp2+"'>"+curr+" _</a> so maybe my options are just either all hyperlinks or none hyperlinks?

In any case thanks a million for the help so far, the main part is done :)

Rowsdower!
05-13-2009, 03:06 PM
WOOOHOOO! that worked! I used the ID only approach and dropped the class, thanks a million, and thanks adios!

There is 2 things I would like to tweak ..

1. Upon loading the page the first few characters are not displayed. Can I insert a delay to call script upon pageload?


2. Is it possible to stop some of the strings being hyperlinked or is this a fundamental part of this script..

Eg:


newslist[0]=new Array("LFC preparing 'mega bid' for Marino star Wook-Jin You")
newslist[1]=new Array("Celebs ready for crunch showdown with Legoland United claims manager Giovanni Trapattoni","http://www.minifigtimes.com/story1.shtml")


Of the above I would like the first string not to be a hyperlink as it is just some snippet of info but the second string I want to remain hyperlinked as it goes to a story..

Possible?

I guess if I didn't want any hyperlinks at all I would remove the <a> tags from <a href='"+temp2+"'>"+curr+" _</a> so maybe my options are just either all hyperlinks or none hyperlinks?

In any case thanks a million for the help so far, the main part is done :)

1. Yes, you need to use setTimeout(blah blah blah). I'm not great with the syntax off of the top of my head so you're best off to google this part.

2. Yes, you can make alternating array items into headings and links and then print them both at the same time using another "temp" variable (say, temp2). Then you print the temp 2 outside of the <a> tag. I don't have time to go into detail on this at the moment either, but play around a bit and see what you come up with.

Partizan
05-13-2009, 03:08 PM
Thanks! I will :)

adios
05-13-2009, 03:12 PM
Try changing this:


temp2 = newslist[cnt][1];
mtxt.innerHTML = "<a href='"+temp2+"'>"+curr+" _</a>"

... to this:


temp2 = newslist[cnt][1];
mtxt.innerHTML = (temp2) ? "<a href='"+temp2+"'>"+curr+" _</a>" : curr + " _";

And: remove the url from that array, and leave the empty string.

You'll probably lose the styling, but that's easy to remedy.

adios
05-13-2009, 03:55 PM
Thought that script looked familiar, it's from the JS Source. Late 1960's, I'd guess. An oldie. IE only.

Do yourself a favor and modify this:


function newsticker()
{
var mtxt = document.getElementById('mtxt');
// next character of current item

... so it'll run elsewhere. Here's your delay:


<body onload="setTimeout('newsticker()', 3000)">

1000 = 1 sec (they're ms).

Partizan
05-13-2009, 09:11 PM
Hey adios,

Thanks alot for this great help!!

I came across the script a few years ago after alot of searching so I think its neat even if real old :)

One thing, the delay didn't have the desired effect, it is working fine but the actually reason I wanted to use the delay was to solves this problem:

When page is loaded for first time, the first about 20 characters are missing.

I don't know why. Didn't happen on my old website:confused:

This is my latest test page http://www.minifigtimes.com/index8.shtml

Everything is perfect except that after initial pageload, first characters are missing.

EDIT: actually there's one other little thing, if may notice that once the first character is written the page drops down a line.... kina of gives a jumping feeling which isn't very nice ..

Rowsdower!
05-13-2009, 09:36 PM
...EDIT: actually there's one other little thing, if may notice that once the first character is written the page drops down a line.... kina of gives a jumping feeling which isn't very nice ..

Try switching to a <div> rather than a <span> and then give the <div> a set CSS height and width to fit the space desired. This should prevent the page from wiggling when text is inserted or if text wraps to a second line.

Partizan
05-13-2009, 09:41 PM
Thanks, I'll give that a shot

adios
05-13-2009, 09:50 PM
Rowsdower! ---- nice avatar. :cool:

[edit] lol, it was a nice avatar. Sheesh.

Partizan
05-13-2009, 09:58 PM
Try switching to a <div> rather than a <span> and then give the <div> a set CSS height and width to fit the space desired. This should prevent the page from wiggling when text is inserted or if text wraps to a second line.


I have tried this:

<div id="mtxt" class="height"></div>
with CSS:
div.height {margin:5em 0 0 0;}

and separately,

<div id="mtxt" class="link-test"></div>
with CSS:
.link-test { font-family: "calibri"; font-size: 100% ; color: #CC0000; display:inline;text-decoration:none;height:5em;}

Neither seem to set an area so I guess I am doing it wrong:confused:

Partizan
05-13-2009, 09:59 PM
Try changing this:


temp2 = newslist[cnt][1];
mtxt.innerHTML = "<a href='"+temp2+"'>"+curr+" _</a>"

... to this:


temp2 = newslist[cnt][1];
mtxt.innerHTML = (temp2) ? "<a href='"+temp2+"'>"+curr+" _</a>" : curr + " _";

And: remove the url from that array, and leave the empty string.

You'll probably lose the styling, but that's easy to remedy.

May I ask how it is remedied? :D

Rowsdower!
05-13-2009, 11:07 PM
I have tried this:

<div id="mtxt" class="height"></div>
with CSS:
div.height {margin:5em 0 0 0;}

and separately,

<div id="mtxt" class="link-test"></div>
with CSS:
.link-test { font-family: "calibri"; font-size: 100% ; color: #CC0000; display:inline;text-decoration:none;height:5em;}

Neither seem to set an area so I guess I am doing it wrong:confused:

Let's have a try with this:
#mtxt {display:block;height:50px;width:200px;}

...and remove the class from your div. There is really no good reason to put one back on there since it already has an ID. No sense in adding extra markup, you know?

@adios: Do you actually get it? If so I think you'll be the first!

adios
05-14-2009, 08:47 AM
Partizan ... fiddled around with your page, made a few changes. Modified that script: among other things, it uses i - the most common variable name in JS - as a global, of all things. Your image script was resetting it, causing the first ticker item to be truncated. Fixed. Also lopped off the cursor at the end, added some bullets. Just a suggestion. Put the ticker in a div. The easily fixed thing I mentioned: #ticker a:link as a selector. The layout's a bit of a mess but, hey, who's isn't? Have fun with the legos.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>The Minifig Times for all your Lego News</title>
<base href="http://www.minifigtimes.com/" />
<link rel="shortcut icon" href="http://www.minifigtimes.com/images-site/icon.ico">
<link rel="stylesheet" type="text/css" href="default.css">
<meta name="description" content="A Lego news blog providing an insight into the crazy world of deranged Legomen otherwise

known as minifigs.">
<meta name="abstract" content="The Minifig Times provides Lego news from the Legoland's town, city, castle, pirates, train,

space, technic and western themes.">
<meta name="robots" content="index,follow">
<meta name="googlebot" content="index,follow">
<meta name="Content-Script-Type" content="text/javascript">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
#ticker {
width: 500px;
height: 32px;
float: left;
margin: 8px 0 0 0;
font: normal 8pt "times new roman";
color: black;
}
#ticker a:link {
color: darkred;
text-decoration: none;
}
#ticker a:visited {
color: purple;
text-decoration: none;
}
#ticker a:hover {
color: red;
text-decoration: none;
}
#ticker a:active {
color: orange;
text-decoration: none;
}
</style>

<!-- ############# NEWS TICKER CODE ############# -->

<script type="text/javascript">

var newslist = new Array();
var cnt = 0; // current news item
var curr = '• ';
var l = -1; // current letter being typed

newslist[0] = new Array("LFC preparing \"mega bid\" for Marino star Wook-Jin You","");
newslist[1]=new Array("Celebs ready for crunch showdown with Legoland United claims manager Giovanni Trapattoni","http://www.minifigtimes.com");

function newsticker()
{
var ticker = document.getElementById('ticker');
// next character of current item

if (l < newslist[cnt][0].length - 1)
{
l++;
temp1 = newslist[cnt][0];
temp1 = temp1.split('');
curr = curr + temp1[l];
temp2 = newslist[cnt][1];
ticker.innerHTML = (temp2) ? '<a href="' + temp2 + '">' + curr + '_</a>' : curr + '_';
setTimeout('newsticker()', 40)
return;
}
// new item
ticker.innerHTML = ticker.innerHTML.replace(/_/, ' •');
l = -1; curr = '• ';
if (cnt < newslist.length - 1)
{
cnt++;
}
else
{
cnt = 0;
}
setTimeout('newsticker()', 6500)
}

</script>

<!-- ############# END TICKER ############# -->

<!-- SCRIPT BELOW IS FOR MULTIPLE IMAGES AND TEXT -->
<script type="text/javascript">

var img = new Array();
var caption = new Array();
var path = "http://www.minifigtimes.com/"

img[0] = path + "news/2009/images/2009-05-09-p1.png"
caption[0] = "Legoland United players celebrated as if they had indeed won the league title but a huge game remains against the Footballing Celebs next Saturday in Legoland City. <br><br> United's match winner, Leper, somewhat controversially dedicated the important win to \"all those whom LFC have insulted this year\"";

img[1] = path + "news/2009/images/2009-05-09-p2.png";
caption[1] = "The curtain has come down on Torino's Serie A party and the team will have to accustom themselves to playing against smaller fry in next season's Serie B.<br><br> Many supporters of the Bulls have blamed millionaire owner Mr Ronald McDonald for the poor season and want him to stump up more cash or quit the club.";

// Add more images here
function changeIMG(direction) {

var current=document.images.nextpic.src;

for (var i = 0;i<img.length;i++) {
if(img[i]==current) {
if(direction=="forward") {
if(i==img.length-1) {
swap(0);
}
else {
swap(i+1);
}
}
if(direction=="back") {
if(i==0) {
swap(img.length-1);
}
else {
swap(i-1);
}
}
break;
}
}
}

function swap(nr) {
document.images.nextpic.src=img[nr];
document.getElementById("imgcaption").innerHTML=caption[nr];
}

</script>
<!-- END -->

<!--Second copy of the script-->
<script type="text/javascript">
<!--
var img2 = new Array();
var caption2 = new Array();
var path2 = "http://www.minifigtimes.com/"

img2[0] = path2 + "news/2009/images/nib-pbr-1.png"
caption2[0] = "Politics: PBR, recently devastated by a Category 5 hurricane, has fractured into three autonomous provinces sparking fears that the state could spiral into all out civil war. <br><br> Correspondents in PBR have reported that the North, Middle and South Province are likely to have difficulties working together due to significant differences between the ministrations and tension between the regions appear to be growing.";

img2[1] = path2 + "news/2009/images/nib-italy-1.png"
caption2[1] = "Politics: The Emperor has formally decreed that the Italian-Lego cities of Bari, Florence, Genoa, Milan, Naples, Parma and Turin shall be renamed as part of the continued state policy of Legoisation. <br><br> The new names for the cities will be Irab, Ecnerolf, Aoneg, Nalim, Selpan, Amrap and Nirut, reverse spellings of their old names. The Castle city of Rome will remain but will be officially known as Ancient Rome.";

img2[2] = path2 + "news/2009/images/nib-riots-1.png"
caption2[2] = "Sport: LFC have accused Parma of being responsible for the death of a taxi driver killed in Marino yesterday. The minifig was set upon by LFC fans and died of stab wounds according to staff at Bricklyn Hospital. <br><br> According to the Blues, Parma's owner Mr Jon Voi is \"inflaming tensions\" ahead of their league meeting in 2 weeks and as such he \"should be immediately apprehended and charged with figslaughter\".";

img2[3] = path2 + "news/2009/images/nib-crest-torino-1.png"
caption2[3] = "Sport: Former Serie A champions Torino will be relegated tomorrow should they lose away to Roma. On the eve of the crucial game, manager Victor Selvaraj has called on the football association to consider a 24-team Serie A for next season. <br><br> \"The more teams, the more competition there is. Competition is key to the success of the championship. If other managers or owners agree, speak out now I say!\"";

img2[4] = path2 + "news/2009/images/nib-city-1.png"
caption2[4] = "Politics: Emperor David has sent an open letter to the minifigs of Rulandstin expressing his sympathy after the state was devastated following a powerful hurricane last week. <br><br> The Emperor said that all government ministers in Legoland would probably hold a minute silence on Monday, if they remember, as a mark of respect for minifigs killed in the PBR. Meterologists reported that Hurricane April reached Category 5.";

img2[5] = path2 + "news/2009/images/nib-minifig-alan-mcmanus-1.png";
caption2[5] = "Sport: Greentown Athletic have been sold to Green Islander businessfig Mr Alan McManus for a £45m fee. Mr McManus will see the club's minifig for the first time when they line-out against Parma at the Athletic Ground. <br><br>Former owner, Higginsland national Mr Primus Stove, is understood to be considering using the £8.75m profit from the sale to bid for Serie B side Foggia but fans at the club are hopeful that he isn't.";

img2[6] = path2 + "news/2009/images/nib-s16c-1.png";
caption2[6] = "Sport: Organisers for the new Super 16 Conference have said that the prize monies available to the participating clubs is likely to be in the region of £160m. <br><br> Teams that qualify from the group stage are set to net £10m, with the semi finalists each earning £15m. The runners-up will land £20m whilst the overall winners will pocket £30m and a chance to earn even more in the Pan Continental Superbowl.";

img2[7] = path2 + "news/2009/images/nib-minifig-emperor-david-1.png";
caption2[7] = "Business: Emperor David has revealed he will not bankroll the redevelopment of the capital despite donating £45m in the last month. <br><br> Speaking to the parliament, the supreme leader of the Third Empire explained that the worsening state of the economy was also hitting his finances and he has no more money to give and in fact may soon be off to his local State Economic Bureau to collect social welfare payments. ";

// Add more images here

function changeIMG2(direction) {

var current=document.images.nextpic2.src;

for (var i = 0;i<img2.length;i++) {
if(img2[i]==current) {
if(direction=="forward") {
if(i==img2.length-1) {
swap2(0);
}
else {
swap2(i+1);
}
}
if(direction=="back") {
if(i==0) {
swap2(img2.length-1);
}
else {
swap2(i-1);
}
}
break;
}
}
}

function swap2(nr) {
document.images.nextpic2.src=img2[nr];
document.getElementById("imgcaption2").innerHTML=caption2[nr];
}

//-->
</script>
<!--End of Second Copy of Script-->
</head>
<body onload="newsticker()">
<div class="filler-menu">
<img src="http://www.minifigtimes.com/images-site/the-minifig-times.png" alt="The Minifig Times">
</div>
<div class="pd_menu_01">
<ul><li><a href="/">Home</a>
</li></ul>
<ul><li><a href="http://www.minifigtimes.com/news-legoland.shtml">News</a>
<ul>
<li><a href="http://www.minifigtimes.com/news-legoland.shtml">Legoland</a></li>
<li><a href="http://www.minifigtimes.com/news-international.shtml">International</a></li>
</ul>
</li></ul>
<ul><li><a href="http://www.minifigtimes.com/football.shtml">Sport</a>
<ul>
<li><a href="http://www.minifigtimes.com/football.shtml">Serie A</a></li>
<li><a href="http://www.minifigtimes.com/football/0809/serie-b.shtml">Serie B</a></li>
<!-- <li><a href="http://www.minifigtimes.com/football/0910/s16c.shtml">Super 16 Conference</a></li> -->
</ul>
</li></ul>
<ul><li><a href="#">Resources</a>
<ul>
<li><a href="http://www.minifigtimes.com/football/0809/downloads.shtml">Downloads</a></li>
<li><a href="http://www.minifigtimes.com/search.shtml">Search</a></li>
<li><a href="http://www.minifigtimes.com/about.shtml">About The Minifig Times</a></li>
<li><a href="http://www.minifigtimes.com/legoland.shtml">About Legoland</a></li>
</ul>
</li></ul>
</div>
<div id="ticker"></div>
<img src="http://www.minifigtimes.com/images-site/the-minifig-times-is-hiring.png" class="farright" alt="The Minifig Times is

hiring!">

<!-- removed class="link-test" -->

<h4 class="story-headline-top" style="margin-top:30px;">Legoland United one win away from Serie A title</h4>
<div class="img right" style="border: 0px solid black; padding: 20px; float: right; width: 250px; max-width: 250px;">
<img name="nextpic" src="http://www.minifigtimes.com/news/2009/images/2009-05-09-p1.png" onclick="changeIMG();"

alt="news">
<a href="#" onclick="changeIMG('forward');return false;" class="link-next-picture">Next Picture</a>
<p id="imgcaption" style="width: 100%;">
Legoland United players celebrated as if they had indeed won the league title but a huge game remains against the

Footballing Celebs next Saturday in
Legoland City. <br><br> United's match winner, Leper, somewhat controversially dedicated the important win to "all

those whom LFC have insulted this year"
</p>
<br>
<br>
<img src="http://www.minifigtimes.com/advert-piecelat.png" alt="Advertisement">


<!-- MAXIMUM LENGTH OF STORY TEXT

#################################################################################################### -->

<div class="left" style="border: 0px solid black; padding: 0px; float: left; width: 550px; max-width: 550px;">
<br>
<p class="section-headers-page">Latest society news</p>

<p class="no-space-above">
<a href="http://www.minifigtimes.com/news/2009/2009-04-08-story01.shtml" class="link-news">Riot errupts in Legoland City

centre after arrest...</a>
</p>

<p class="no-space-above">
<a href="http://www.minifigtimes.com/news/2009/2009-03-25-story01.shtml" class="link-news">Dickus labels General Secretary an

"idiot"...</a>
</p>

<p class="no-space-above">
<a href="http://www.minifigtimes.com/news/2009/2009-03-10-story01.shtml" class="link-news">Council unveals proposals for

capital redesign...</a>
</p>

<p class="no-space-above">
<a href="http://www.minifigtimes.com/news/2009/2009-02-23-story01.shtml" class="link-news">Nation's third largest bank

collapses...</a>
</p>

<p class="no-space-above">
<a href="http://www.minifigtimes.com/news/2009/2009-02-20-story01.shtml" class="link-news">Calls for government to

resign...</a>
</p>
</div>
</div>
<div id="wrapper-main-body">
<p>
The Serie A title will be going to one of the two Old Rule clubs yet again as Ajax Skerries fell out of the title race this

afternoon after defeat to Marino.
Legoland United's 1-0 win over Torino and Legoland FC's 1-1 tie with Republic saw the top two switch places in the standings.

Legoland United now hold the
smallest of margins over their bitter adversaries, leading LFC by a single point with one round remaining.
</p>
<p>
Legoland United's win relegated Torino, and with the Reds having relegated Robin Rangers last weekend, the champions elect

could do an amazing triple act by
relegating the Celebs next Saturday. A victory for the league leaders will secure the club their first title in a decade and

should Fiorentina manage
to pick-up at least a point against Juventus, the Celebs will bow out of the top flight. The loss of such a prestigious club

from the league would be a significant
blow to next season's championship and quite possible see overall television incomes reduced across all Serie A teams and

would most certainly see a host
of top names leave the Nurit giants on free transfers. These are likely to include César Prates, Florent Malouda,
Frank Lampard, Mohamed Kallon and Gabriel Milito.
</p>
<p>
At the Partizan, Adrian Mutu's 93rd minute strike salvaged a point for the Blues against high flying Republic. The final

whistle was greeted with jeers from
the home crowd and calls for the dismissal of LFC manager Patrice Loko. Speaking after the game, Loko blamed the result on

detergent. "The problem I had
with washing-up liquid was not a laughing matter. Our game preparations were thrown into disorder moments prior to kick-off

as the liquid I employed to
clean my magnifying glass actually made it worse and in fact impossible to see clearly with. I could not observe my intended

team line-up or clever
tactics through the glass and had no time to procure a substitute magnifying glass." Loko's counterpart at Republic was

having none of it and called Loko's
remarks "hogwash". "To blame a tool for a defeat is an insult to the opponents. Fact is LFC are not invincible and we have a

good squad of players here. Loko
should show more respect" said boss Carlos Bianchi. <a href="http://www.minifigtimes.com/news/2009/2009-05-09-story01.shtml"

class="link-next-nib">Full Story</a>
</p>
<h4 class="story-headline">LFC furious after heavy fine is handed down to club</h4>
<p>
Legoland FC have reacted angrily this evening after the Legoland Football Association handed down a £50,000 fine for

their players' conduct during
today's Serie A clash against Republic. The decision was made following a review of TV evidence the association said after a

request from
the match referee Devious Ethos. Mr Ethos was harangued and verbally abused by five players from the LFC team after he had

handed out a yellow
card to Denilson for a dangerous foul on Republic's Steve Finnan. He subsequently booked 5 other LFC players in the ensuing

melee.
<a href="http://www.minifigtimes.com/news/2009/2009-05-09-story02.shtml" class="link-next-nib">Full Story</a>
</p>
</div>
<div>
<div class="subwrapper news-stories-grid-top">
<div>
<img src="http://www.minifigtimes.com/news/2009/images/2009-05-12-p1.png" alt="LEGO news">
<p>
<a href="http://www.minifigtimes.com/news/2009/2009-05-12-story01.shtml" class="link-read-story">
Admirable Mr Prints calls for Serie A expansion
</a>
</p>
</div>
<div class="mid">
<img src="http://www.minifigtimes.com/news/2009/images/2009-05-02-p3.png" alt="LEGO news">
<p>
<a href="http://www.minifigtimes.com/news/2009/2009-05-02-story02.shtml" class="link-read-story">
Four police officers injured after football related violence in Marino
</a>
</p>
</div>
<div>
<img src="http://www.minifigtimes.com/news/2009/images/2009-05-01-p1.png" alt="LEGO news">
<p>
<a href="http://www.minifigtimes.com/news/2009/2009-05-01-story01.shtml" class="link-read-story">
Cartel call teams backing Serie A expansion "retard clubs"
</a>
</p>
</div>
</div> <!-- sub wrapper Div end -->
</div>
<div>
<br>
<br>
<br>
<br>
<br>
</div>
<div class="footer">
<hr>
<p>
This is an unofficial LEGO® website not endorsed by The LEGO Group. The Minifig Times © 2009 The Mr Prints Group
</p>
</div>
<!-- Start of StatCounter Code -->
<script type="text/javascript">
var sc_project=4634995;
var sc_invisible=1;
var sc_partition=56;
var sc_click_stat=1;
var sc_security="42da31d4";
</script>
<script type="text/javascript"
src="http://www.statcounter.com/counter/counter.js"></script><noscript><div
class="statcounter"><a title="wordpress visitor"
href="http://www.statcounter.com/wordpress.org/"><img class="statcounter"
src="http://c.statcounter.com/4634995/0/42da31d4/1/"
alt="wordpress visitor" ></a></div></noscript>
<!-- End of StatCounter Code -->
</body>
</html>

Partizan
05-14-2009, 03:57 PM
Thanks for all the help and effort adios!

I have been spending all day playing around with it but couldn't get it to quite work for a long time however now I am happy enough with what is appearing in my firefox now:

http://www.minifigtimes.com/indexadios3.shtml

On IE8 the page the ticker doesn't appear. I am not sure if it just my IE8 as I have problems with it before (eg the Next Picture feature doesn't work too and never did - perhaps some Javascript setting is off but can't find anything to say so).

It be great if someone could let me know if (a) ticker works on IE, (b) layout is same as FF or not seriously distored and (c) Next Picture script works too?

THANKS!


Have fun with the legos.

o I will :D:D:D

adios
05-14-2009, 09:43 PM
Using IE7 and it's fine. Not seeing anything?

You changed the arguments to replace(); now it replaces a space and the cursor with - another cursor. The whole idea was to remove the cursor when done. I'd say the 'LATEST' thing is overkill (that usually goes with a ticker) but, a matter of taste. 'Next picture' works, except you could use a preloader to make it faster. And making all the ticker messages red gives a user no clue (with underlines removed) which ones are links.

Layout is a mess in IE. Got some work to do there.

Partizan
05-14-2009, 10:38 PM
Thanks again adios!

I take your points on the appearance of the ticker now.. I'm just in experimental mode :)

Regarding IE, I will look into this when I get to another computer as my own IE seems to display things different to others.

adios
05-14-2009, 10:51 PM
cheers :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum