[eluser]Andreas Krohn[/eluser]
After some further debugging it boils down to if I am using a doctype or not, which is quite weird. From my controller I send the $tagcloud array that contains $tags, each one with the attributes "font_size", "tag_name" and "tag_url". The view I am using looks like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
</head>
<body>
<h2>Tag Cloud</h2>
<?php
foreach($tagcloud as $tag)
print"<a href='#' style='font-size: ".$tag->font_size."'>".$tag->tag_name."</a> ";
?>
</body>
</html>
The tag cloud HTML rendered by this view looks like this:
<a href="#" style="">Tag10</a> <a href="#" style="">Tag15</a> <a href="#" style="">Tag20</a>
However, when removing the doctype from the view I get this HTML rendered:
<a href="#" style="font-size: 10px;">Tag10</a> <a href="#" style="font-size: 15px;">Tag15</a> <a href="#" style="font-size: 20px;">Tag20</a>
That means that when I use a doctype the style attributes are somehow emptied! I have tried this in a number of browsers and with several different valid doctypes, but the result is the same. Using CodeIgniter 1.6.1