tags:

views:

187

answers:

3

Hi,

When reloading the page, sometimes <li>Dagbladet</li> is rendered with a linebreak before "t", so it looks like:

Dagblade
t

<li>DN</li> is always rendered as:

D
N

I´d like to list each list element to the right for the previous one. It´s positioned as it should when I don´t activate sIFR3.

All tips on how to use sIFR3 with to achieve this is highly appreciated! The list should look like this:

 Aftenposten Dagbladet Verdens Gang DN 




<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  "http://www.w3.org/TR/html4/strict.dtd"&gt;
<html>
<head>
  <meta http-equiv="Content-type" content="text/html; charset=utf-8">
  <title>type-test</title>  
  <link rel="stylesheet" href="sifr/sifr.css" type="text/css">

  <script src="sifr/sifr.js" type="text/javascript"></script>

  <script type="text/javascript" charset="utf-8">
    var cochin = { src: '/sifr3-r436/demo/cochin.swf'}

    sIFR.activate(cochin);

    sIFR.replace(cochin, {
      selector: 'h1, h2, h3, h4, li',
      css: '.sIFR-root {    }'
    });

  </script>

  <style type="text/css" media="screen">
    ul li {
      list-style: none ;
      display: inline ;
    }    
  </style>

</head>

<body>

<p>
<ul>
  <li>Aftenposten</li>
  <li>Dagbladet</li>
  <li>Verdens Gang</li>
  <li>DN</li>
<ul>
</p>



</body>
</html>
A: 

I really think you need to be posting this on the SIFR Support Forums. This isn't a programming issue.

Lazarus
Sorry, no can do: > Sticky: Please Ask Questions at Stack Overflow by Mark Wubben. The post-new subject link is also removed from the board. I´d argue it is a programming issue, that beeing JS, HTML or Flash. :)
I wouldn't say that "Why doesn't this Flash plugin work how I expect it to?" is a programming question. You haven't indicated anything you've tried to make it work, simply posted what doesn't work for you or at least that's how it appears. If that's not the case then get editing and let's see if someone can shed some light :)
Lazarus
+1  A: 

sIFR uses the width of the original element to fit the Flash text into. In your case, the Flash text is wider than the original element, doesn't fit and instead breaks into a new line.

The solution is to add some letter-spacing (through a .sIFR-active selector) to make the HTML text wider just for sIFR. Then when the replacement happens there'll be enough space to fit the Flash text.

Mark Wubben
+1  A: 

use like this

sIFR.replace(test, {
  selector: 'h1',
  css: '.sIFR-root { color: #cccccc; width: 100%; text-align: left; letter-spacing:1;}',
  wmode: 'transparent',
  forceSingleLine: true;
});

forceSingleLine: true; will solve your problem.

metal-gear-solid